compilation failes (V2.2, Archlinux)

  • 7 Replies
  • 4508 Views
*

lkjbs

  • *
  • 13
    • View Profile
compilation failes (V2.2, Archlinux)
« on: December 02, 2021, 05:01:31 PM »
Hi everyone, I'm getting some wx-related errors while trying to compile v2.2. I suspect some of these issues might be due to using Arch, vs. Ubuntu. Any help would be sincerely appreciated.

Code: [Select]
[ 71%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.o
In file included from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/platform.h:596,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:27,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:24:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/chkconf.h:763:13: error: #error "wxUSE_LIBMSPACK must be defined, please read comment near the top of this file."
  763 | #           error "wxUSE_LIBMSPACK must be defined, please read comment near the top of this file."
      |             ^~~~~
In file included from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/chkconf.h:1249,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/platform.h:596,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:27,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:24:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/unix/chkconf.h:15:13: error: #error "wxSelect/EpollDispatcher needed for console event loop"
   15 | #           error "wxSelect/EpollDispatcher needed for console event loop"
      |             ^~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/unix/chkconf.h:26:13: error: #error "wxFileSystemWatcher requires either inotify() or kqueue()"
   26 | #           error "wxFileSystemWatcher requires either inotify() or kqueue()"
      |             ^~~~~
In file included from /tmp/scopefun-software/source/scopefun/app/app.cpp:26:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:49:6: error: #error "Dynamic Loading classes can't be compiled on this platform, sorry."
   49 |     #error "Dynamic Loading classes can't be compiled on this platform, sorry."
      |      ^~~~~
In file included from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/stopwatch.h:21,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/timer.h:22,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/aui/framemanager.h:25,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/aui/auibook.h:25,
                 from /tmp/scopefun-software/source/scopefun/gui/guiheader.h:46,
                 from /tmp/scopefun-software/source/scopefun/gui/osc.h:41,
                 from /tmp/scopefun-software/source/scopefun/gui/OsciloskopTools.h:29,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:44:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/time.h:62:2: warning: #warning using pseudo thread-safe wrapper for localtime to emulate localtime_r [-Wcpp]
   62 | #warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
      |  ^~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/time.h:72:2: warning: #warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r [-Wcpp]
   72 | #warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
      |  ^~~~~~~
In file included from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:745,
                 from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:24:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:1074:53: error: zero width for bit-field ‘wxAssert_1074::SizeTMustBeExactly4Bytes’
 1074 |         wxCOMPILE_TIME_ASSERT( sizeof(size_t) == 4, SizeTMustBeExactly4Bytes);
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/debug.h:434:57: note: in definition of macro ‘wxCOMPILE_TIME_ASSERT’
  434 |         struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
      |                                                         ^~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:1075:53: error: zero width for bit-field ‘wxAssert_1075::PtrMustBeExactly4Bytes’
 1075 |         wxCOMPILE_TIME_ASSERT( sizeof(void *) == 4, PtrMustBeExactly4Bytes);
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/debug.h:434:57: note: in definition of macro ‘wxCOMPILE_TIME_ASSERT’
  434 |         struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
      |                                                         ^~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:1093:37: error: zero width for bit-field ‘wxAssert_1092::Wchar_tMustBeExactly2Bytes’
 1093 |                                     Wchar_tMustBeExactly2Bytes);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/debug.h:434:57: note: in definition of macro ‘wxCOMPILE_TIME_ASSERT’
  434 |         struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
      |                                                         ^~~
In file included from /tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:24:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:1270:25: error: conflicting declaration ‘typedef wxInt32 ssize_t’
 1270 |         typedef wxInt32 ssize_t;
      |                         ^~~~~~~
In file included from /usr/include/stdlib.h:394,
                 from /usr/include/c++/11.1.0/cstdlib:75,
                 from /usr/include/c++/11.1.0/stdlib.h:36,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/xmmintrin.h:34,
                 from /tmp/scopefun-software/lib/SDL2-2.0.12/include/SDL_cpuinfo.h:92,
                 from /tmp/scopefun-software/lib/SDL2-2.0.12/include/SDL.h:38,
                 from /tmp/scopefun-software/source/core/core.h:37,
                 from /tmp/scopefun-software/source/scopefun/ScopeFun.h:26,
                 from /tmp/scopefun-software/source/scopefun/app/app.cpp:21:
/usr/include/sys/types.h:108:19: note: previous declaration as ‘typedef __ssize_t ssize_t’
  108 | typedef __ssize_t ssize_t;
      |                   ^~~~~~~
In file included from /tmp/scopefun-software/source/scopefun/app/app.cpp:26:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:231:12: error: ‘wxDllType’ does not name a type; did you mean ‘wxKeyType’?
  231 |     static wxDllType         GetProgramHandle();
      |            ^~~~~~~~~
      |            wxKeyType
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:256:12: error: ‘wxDllType’ does not name a type; did you mean ‘wxKeyType’?
  256 |     static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT);
      |            ^~~~~~~~~
      |            wxKeyType
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:261:5: error: ‘wxDllType’ does not name a type; did you mean ‘wxKeyType’?
  261 |     wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; }
      |     ^~~~~~~~~
      |     wxKeyType
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:264:24: error: ‘wxDllType’ has not been declared
  264 |     static void Unload(wxDllType handle);
      |                        ^~~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:270:5: error: ‘wxDllType’ does not name a type; did you mean ‘wxKeyType’?
  270 |     wxDllType GetLibHandle() const { return m_handle; }
      |     ^~~~~~~~~
      |     wxKeyType
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:296:18: error: expected ‘;’ at end of member declaration
  296 |     static void *RawGetSymbol(wxDllType handle, const wxString& name);
      |                  ^~~~~~~~~~~~
      |                              ;
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:296:40: error: expected ‘)’ before ‘handle’
  296 |     static void *RawGetSymbol(wxDllType handle, const wxString& name);
      |                              ~         ^~~~~~~
      |                                        )
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:304:5: error: ‘void* wxDynamicLibrary::RawGetSymbol(const wxString&) const’ conflicts with a previous declaration
  304 |     }
      |     ^
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:296:18: note: previous declaration ‘void* wxDynamicLibrary::RawGetSymbol’
  296 |     static void *RawGetSymbol(wxDllType handle, const wxString& name);
      |                  ^~~~~~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:375:5: error: ‘wxDllType’ does not name a type; did you mean ‘wxKeyType’?
  375 |     wxDllType m_handle;
      |     ^~~~~~~~~
      |     wxKeyType
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h: In constructor ‘wxDynamicLibrary::wxDynamicLibrary()’:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:236:26: error: class ‘wxDynamicLibrary’ does not have any field named ‘m_handle’
  236 |     wxDynamicLibrary() : m_handle(0) { }
      |                          ^~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h: In constructor ‘wxDynamicLibrary::wxDynamicLibrary(const wxString&, int)’:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:238:11: error: class ‘wxDynamicLibrary’ does not have any field named ‘m_handle’
  238 |         : m_handle(0)
      |           ^~~~~~~~
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h: In member function ‘bool wxDynamicLibrary::IsLoaded() const’:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:248:36: error: ‘m_handle’ was not declared in this scope; did you mean ‘sa_handler’?
  248 |     bool IsLoaded() const { return m_handle != 0; }
      |                                    ^~~~~~~~
      |                                    sa_handler
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h: In member function ‘void wxDynamicLibrary::Unload()’:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:267:48: error: ‘m_handle’ was not declared in this scope; did you mean ‘sa_handler’?
  267 |     void Unload() { if ( IsLoaded() ) { Unload(m_handle); m_handle = 0; } }
      |                                                ^~~~~~~~
      |                                                sa_handler
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h: In member function ‘void* wxDynamicLibrary::RawGetSymbol(const wxString&) const’:
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:302:29: error: ‘m_handle’ was not declared in this scope; did you mean ‘sa_handler’?
  302 |         return RawGetSymbol(m_handle, name);
      |                             ^~~~~~~~
      |                             sa_handler
/tmp/scopefun-software/lib/wxWidgets-3.0.5/include/wx/dynlib.h:302:28: error: ‘wxDynamicLibrary::RawGetSymbol’ cannot be used as a function
  302 |         return RawGetSymbol(m_handle, name);
      |                ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
make[2]: *** [source/CMakeFiles/ScopeFun.dir/build.make:384: source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:286: source/CMakeFiles/ScopeFun.dir/all] Error 2
make: *** [Makefile:156: all] Error 2


*

lkjbs

  • *
  • 13
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #1 on: December 03, 2021, 02:51:10 PM »
update: I decompressed the .deb packages and manually installed version 2.2.0-RC1 and version 2.1.2 on my archlinux machine. Unfortunately, only the older version worked. When I try to run version 2.2, the program freezes and I have to kill the process. So, I suspect there might be some general issues with 2.2.0-RC1, in addition to the compilation issues I mentioned earlier. Any thoughts?

*

Dejan

  • *****
  • 150
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #2 on: December 11, 2021, 10:24:07 PM »
It looks like there was some problem in the wxWidgets configuration during the build process. You should try to clean the make and cmake cache and re-start the building process.

I am not aware of any general issue with latest version. Maybe there is some conflict with previous install.

I have also successfully build  the software in archlinux.  Here are the steps I used:

Code: [Select]
pacman -Sy --noconfirm
pacman -S git --noconfirm
pacman -S automake --noconfirm
pacman -S autoconf --noconfirm
pacman -S cmake --noconfirm
pacman -S make --noconfirm
pacman -S gcc --noconfirm
pacman -S python --noconfirm
pacman -S gtk3 --noconfirm
pacman -S pkgconf --noconfirm

git clone --branch develop https://gitlab.com/scopefun/scopefun-software.git
mkdir scopefun-software/build && cd scopefun-software/build
cd ./../lib/libusb-1.0.22 && aclocal && automake && cd .. && cd ../build
chmod +x ../lib/wxWidgets-3.0.5/src/stc/gen_iface.py
chmod +x ../lib/libusb-1.0.22/install-sh

cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="2" -D SCOPEFUN_VERSION_MINOR="2" \
  -D SCOPEFUN_VERSION_MICRO="0" -D SCOPEFUN_BUILD_TYPE="Release" \
  -D CPACK_BINARY_DEB="true" -D CPACK_BINARY_TZ="false" \
  -D CPACK_BINARY_TGZ="false"-D CPACK_BINARY_STGZ="false" ..

make package

The last step will build the software and generate the install-script: ScopeFun-2.2.0-Linux.sh. This script can be used to output the install package contents. In my case, the files were written to ./scopefun-software/build/ScopeFun-2.2.0-Linux. You then have to manually copy the output files to the system folders, using the following commands

Code: [Select]
cp -r ./lib/oscilloscope /usr/lib
cp ./bin/scopefun /usr/bin/
« Last Edit: December 11, 2021, 10:25:48 PM by Dejan »

*

lkjbs

  • *
  • 13
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #3 on: December 16, 2021, 06:08:42 PM »
Hey Dejan,

Thank you so much for looking into this! Really appreciated. I'll try again on my machine and report back. Thanks again!

*

lkjbs

  • *
  • 13
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #4 on: January 02, 2022, 12:28:23 AM »
Hey Dejan,

Sorry to keep bothering you about it, and if you don't have time to answer, I completely understand. However, if you (or anyone else here in the forums) did have some time to help, I would very much appreciate it.

I copy/pasted your code from the previous post - ensuring all packages were installed, system was updated, etc. - but, unfortunately, I continue to get errors. Running your code exactly returns the following errors:

Code: [Select]
[ 80%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.o
In file included from /tmp/scope/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:27,
                 from /tmp/scope/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /tmp/scope/scopefun-software/source/scopefun/app/app.cpp:24:
/tmp/scope/scopefun-software/lib/wxWidgets-3.0.5/include/wx/platform.h:183:10: fatal error: wx/setup.h: No such file or directory
  183 | #include "wx/setup.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [source/CMakeFiles/ScopeFun.dir/build.make:384: source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:286: source/CMakeFiles/ScopeFun.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

*

Dejan

  • *****
  • 150
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #5 on: January 03, 2022, 11:16:37 AM »
Please make sure you are using the build command make package. The error you are getting can appear if you are using just make.


*

lkjbs

  • *
  • 13
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #6 on: January 03, 2022, 09:57:19 PM »
UPDATE: spun up a clean archlinux VM, and...compilation works as expected. Blah, sorry to waste everyone's time. Although now I need to go back, and figure out why it's failing on my machine. Thanks again for your help Dejan!

Hi Dejan, yes, I build using the make package command, not justmake
« Last Edit: January 03, 2022, 10:12:08 PM by lkjbs »

*

Dejan

  • *****
  • 150
    • View Profile
Re: compilation failes (V2.2, Archlinux)
« Reply #7 on: January 04, 2022, 07:43:27 AM »
No worries. Thanks for confirming.