Compile issue

  • 9 Replies
  • 3773 Views
Compile issue
« on: March 31, 2020, 03:08:43 PM »
Hi,

I've read the Software installation. After minutes of compiling I have this :

/home/habib/ScopeFun-2.0.16-Source/scopefun-software/lib/wxWidgets-3.0.4/include/wx/platform.h|183|fatal error: wx/setup.h: Aucun fichier ou dossier de ce type|

Please could you give me a clu to fiw this

Best regards

*

Dejan

  • *****
  • 142
    • View Profile
Re: Compile issue
« Reply #1 on: March 31, 2020, 09:00:33 PM »
Hello

Did you follow instructions for software compile found here: https://gitlab.com/scopefun/scopefun-software/-/blob/master/doc/build/build.pdf

Could you provide more information? Please provide the commands you entered.

Regards,
Dejan

Re: Compile issue
« Reply #2 on: April 02, 2020, 12:27:56 PM »
Hi Dejan,

Sure.

habib@betelgeuse:~/scopefun-software/build$ cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE="Release" -D CPACK_BINARY_DEB="true" -D CPACK_BINARY_TZ="false" -D CPACK_BINARY_TGZ="false" -D CPACK_BINARY_STGZ="false" ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/habib/scopefun-software/build

....

Configured wxWidgets 3.0.4 for `x86_64-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for GTK+ printing libnotify
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         no
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.6      no
                                       wxWidgets 2.8      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
....

checking for ensurepip... no
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
configure: WARNING: unrecognized options: --with-pic
creating Modules/Setup
creating Modules/Setup.local
creating Makefile


If you want a release build with all optimizations active (LTO, PGO, etc),
please run ./configure --enable-optimizations

....

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _sqlite3           _tkinter       
bsddb185           dbm                dl             
gdbm               imageop            sunaudiodev     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

[ 22%] No install step for 'Python2716'
[ 22%] Completed 'Python2716'
[ 22%] Built target Python2716
Scanning dependencies of target sfServer
[ 22%] Building CXX object source/CMakeFiles/sfServer.dir/server/main.cpp.o
In file included from /home/habib/scopefun-software/lib/wxWidgets-3.0.4/include/wx/defs.h:27:0,
                 from /home/habib/scopefun-software/lib/wxWidgets-3.0.4/include/wx/string.h:24,
                 from /home/habib/scopefun-software/lib/wxWidgets-3.0.4/include/wx/artprov.h:14,
                 from /home/habib/scopefun-software/source/server/ui/serverui.h:23,
                 from /home/habib/scopefun-software/source/server/ui/ScopeFunServerUI.h:29,
                 from /home/habib/scopefun-software/source/server/main.cpp:21:
/home/habib/scopefun-software/lib/wxWidgets-3.0.4/include/wx/platform.h:183:10: fatal error: wx/setup.h: Aucun fichier ou dossier de ce type
 #include "wx/setup.h"
          ^~~~~~~~~~~~
compilation terminated.
source/CMakeFiles/sfServer.dir/build.make:62: recipe for target 'source/CMakeFiles/sfServer.dir/server/main.cpp.o' failed
make[2]: *** [source/CMakeFiles/sfServer.dir/server/main.cpp.o] Error 1
CMakeFiles/Makefile2:261: recipe for target 'source/CMakeFiles/sfServer.dir/all' failed
make[1]: *** [source/CMakeFiles/sfServer.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


May be this message could help

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _sqlite3           _tkinter       
bsddb185           dbm                dl             
gdbm               imageop            sunaudiodev   


Thanks in advance !

*

David

  • *
  • 10
    • View Profile
Re: Compile issue
« Reply #3 on: April 02, 2020, 07:06:36 PM »
Hello

We have a few questions:

1. Which version of linux are you using?
2. Did you install all the linux development packages?
  • Gnu C++ compiler: build essentials
  • GTK+ development libraries: lib-gtk3-dev
  • libudev: libudev-dev
  • OpenGL development libraries: libgl1-messa-dev
It looks like wxWidgets configuration is not done right. One possibility is that lib-gtk3-dev package is the problem. Can you please check that /home/habib/scopefun-software/lib/wxWidgets-3.0.4/sfBuild64r/lib/wx/include/gtk3-unicode-static-3.0 folder was generated? Does it contain wx/setup.h ? In case you used some other version of gtk you must change ./source/sfLibs.cmake file. More precisely the SCOPEFUN_LIB_INCLUDE_WX_SETUP variable.

3. Did you run "make" or "make package" command?

Hope this helps.

Regards
« Last Edit: April 03, 2020, 05:29:52 PM by David »

Re: Compile issue
« Reply #4 on: April 02, 2020, 09:19:26 PM »
Hi !

First of all thank you for your response.

I try to run ScopeFun on my Ubuntu 18.

habib@betelgeuse:~/scopefun-software$ lsb_release -a
LSB Version:   core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID:   Ubuntu
Description:   Ubuntu 18.04.4 LTS
Release:   18.04
Codename:   bionic

Please see what I have :
habib@betelgeuse:~/scopefun-software$ ls lib/wxWidgets-3.0.4/sfBuild64r/lib/wx/include/gtk2-unicode-static-3.0/wx/setup.h

I had run make as it is described in build.pdf

a Snipett of "source/sfLibs.cmake"

# include platform specifix folders
if( NOT (SCOPEFUN_VISUALSTUDIO_X64 OR SCOPEFUN_VISUALSTUDIO_X86) )
   if(SCOPEFUN_WINDOWS)
      set(SCOPEFUN_LIB_INCLUDE_PYTHON_PC "${CMAKE_SOURCE_DIR}/lib/Python-2.7.16/PC" CACHE PATH "include folder for python on windows" FORCE)
      set(SCOPEFUN_LIB_INCLUDE_WX_SETUP  "${CMAKE_SOURCE_DIR}/lib/wxWidgets-3.0.4/sfBuild${SCOPEFUN_TYPE}/lib/wx/include/msw-unicode-static-3.0" CACHE PATH "include folder for wx/setup.h" FORCE )
   endif()
   if(SCOPEFUN_MACOSX)
      set(SCOPEFUN_LIB_INCLUDE_PYTHON_PC "${CMAKE_SOURCE_DIR}/lib/Python-2.7.16/sfBuild${SCOPEFUN_TYPE}" CACHE PATH "include folder for python on mac and linux" FORCE)
      set(SCOPEFUN_LIB_INCLUDE_WX_SETUP  "${CMAKE_SOURCE_DIR}/lib/wxWidgets-3.0.4/sfBuild${SCOPEFUN_TYPE}/lib/wx/include/osx_cocoa-unicode-static-3.0" CACHE PATH "include folder for wx/setup.h" FORCE )
   endif()
   if(SCOPEFUN_LINUX)
      set(SCOPEFUN_LIB_INCLUDE_PYTHON_PC "${CMAKE_SOURCE_DIR}/lib/Python-2.7.16/sfBuild${SCOPEFUN_TYPE}" CACHE PATH "include folder for python on mac and linux" FORCE)
      set(SCOPEFUN_LIB_INCLUDE_WX_SETUP  "${CMAKE_SOURCE_DIR}/lib/wxWidgets-3.0.4/sfBuild${SCOPEFUN_TYPE}/lib/wx/include/gtk3-unicode-static-3.0" CACHE PATH "include folder for wx/setup.h" FORCE )
   endif()
endif()


Best regards, H

*

David

  • *
  • 10
    • View Profile
Re: Compile issue
« Reply #5 on: April 03, 2020, 08:20:08 AM »
Hello,

We think that the problem is that wxWidgets used gtk2 instead of gtk3 library. Here is what you can try:
  • Did you installed lib-gtk3-dev? If not, then install lib-gtk3-dev library.
  • Manualy change cmake to configure with gtk2. This require you to change "gtk3-unicode-static-3.0" to "gtk2-unicode-static-3.0" in ./source/sfLibs.cmake file. Then you must search for SCOPEFUN_LIBS variable used on Linux(line 202) and fix all gtk3 to gtk2. This is required in order to link properly.
Hope this helps.

Regards
« Last Edit: April 03, 2020, 05:30:05 PM by David »

Re: Compile issue
« Reply #6 on: April 03, 2020, 04:47:12 PM »
Hi David,

I have no  lib-gtk3-dev available on repository Ubuntu 18.04.
I Think it's time to upgrade.

BTW I make what you suggest me.

/home/habib/scopefun-software/source/core/purec/purec.c:53:5: warning: incompatible implicit declaration of built-in function ‘memcpy’
/home/habib/scopefun-software/source/core/purec/purec.c:53:5: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
[ 45%] Building C object source/CMakeFiles/sfServer.dir/api/scopefun.c.o
[ 46%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm96.c.o
[ 47%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm512.c.o
[ 47%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm64.c.o
[ 48%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm256.c.o
[ 49%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm16.c.o
[ 50%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm32.c.o
[ 50%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm128.c.o
make[2]: ***  Aucune règle pour fabriquer la cible « ../lib/wxWidgets-3.0.4/sfBuild64r/lib/libwxjpeg-3.0.a », nécessaire pour « ../bin/sfServer64r ». Arrêt.
CMakeFiles/Makefile2:261: recipe for target 'source/CMakeFiles/sfServer.dir/all' failed
make[1]: *** [source/CMakeFiles/sfServer.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

Thanks anyway, H

*

David

  • *
  • 10
    • View Profile
Re: Compile issue
« Reply #7 on: April 03, 2020, 05:08:27 PM »
Hi,

You can try to add "#include <string.h>" at the top of ./source/core/purec/purec.c file like the error suggests. I also find it hard to believe that there is no lib-gtk3-dev in Ubuntu 18.04. Maybe you must switch to some other repository or there is but under some other similar name. I'm just guessing.

Regards
« Last Edit: April 03, 2020, 05:30:15 PM by David »

Re: Compile issue
« Reply #8 on: April 04, 2020, 01:16:22 PM »
Hi David,

Ok i have just include <string.h> in purec.c and it does not complain now.

Beside this I have no lib-gtk3-dev on my station, please see
apt-cache showpkg lib-gtk3-dev
N: Impossible de trouver le paquet lib-gtk3-dev
habib@betelgeuse:~/scopefun-software/build$

The only similar name is libgtk-3-dev
apt-cache show libgtk-3-dev
Package: libgtk-3-dev
Architecture: amd64
Version: 3.22.30-1ubuntu4
Multi-Arch: same
Priority: optional
Section: libdevel
Source: gtk+3.0
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

Always the same errors :
...
[ 45%] Building C object source/CMakeFiles/sfServer.dir/core/purec/purec.c.o
[ 45%] Building C object source/CMakeFiles/sfServer.dir/api/scopefun.c.o
[ 46%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm96.c.o
[ 47%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm512.c.o
[ 47%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm64.c.o
[ 48%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm256.c.o
[ 49%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm16.c.o
[ 50%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm32.c.o
[ 50%] Building C object source/CMakeFiles/sfServer.dir/osciloscope/xpm/xpm128.c.o
make[2]: ***  Aucune règle pour fabriquer la cible « ../lib/wxWidgets-3.0.4/sfBuild64r/lib/libwxjpeg-3.0.a », nécessaire pour « ../bin/sfServer64r ». Arrêt.
CMakeFiles/Makefile2:261: recipe for target 'source/CMakeFiles/sfServer.dir/all' failed
make[1]: *** [source/CMakeFiles/sfServer.dir/all] Error 2
Makefile:151: recipe for target 'all' failed


Best regards

*

David

  • *
  • 10
    • View Profile
Re: Compile issue
« Reply #9 on: April 04, 2020, 02:32:28 PM »
Hi,

This is almost good news. Your gtk3 generated library file names does not match those that are specifies in sfLibs.cmake file. Try to compile with libgtk-3-dev package and change the files names with correct ones for your package version.

Here is what you can try:

1.  install "libgtk-3-dev" package.
2. Recompile so that your wxWidgets library files will be generated. You will get errors.
3. Look into  ../lib/wxWidgets-3.0.4/sfBuild64r/lib/ folder for all *.a files. Add them to SCOPEFUN_LIBS variable under Linux( line 202) in ./source/sfLibs.cmake.
4. Remove all *libwx*.a files from SCOPEFUN_LIBS that are not in  ../lib/wxWidgets-3.0.4/sfBuild64r/lib/ folder.
5. Recompile.

Hope it helps.