Compilation issues on Fedora 35

  • 5 Replies
  • 3852 Views
Compilation issues on Fedora 35
« on: January 28, 2022, 06:05:25 PM »
Hello,
did somebody tried to compile ScopeFun on Fedora 35?
I'm trying to compile there version Release_v2.2.0-RC2 and it is failing with following error:

Code: [Select]
$ make package
[  4%] Built target wxWidgets305
[  7%] Built target libUsb
Consolidate compiler generated dependencies of target SDL2-static
[ 73%] Built target SDL2-static
Consolidate compiler generated dependencies of target pythonApi
[ 75%] Built target pythonApi
Consolidate compiler generated dependencies of target ScopeFun
[ 75%] Building CXX object source/CMakeFiles/ScopeFun.dir/scopefun/app/app.cpp.o
In file included from /home/dahorak/make/scopefun-software/lib/wxWidgets-3.0.5/include/wx/defs.h:27,
                 from /home/dahorak/make/scopefun-software/lib/wxWidgets-3.0.5/include/wx/wxprec.h:12,
                 from /home/dahorak/make/scopefun-software/source/scopefun/app/app.cpp:24:
/home/dahorak/make/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:312: source/CMakeFiles/ScopeFun.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I'm not sure, if I installed all the required packages, because they are named differently than in Ubuntu, but I tried to match them and also I tried to find what package contains wx/setup.h  and install that package(s), but without any luck.

*

Dejan

  • *****
  • 150
    • View Profile
Re: Compilation issues on Fedora 35
« Reply #1 on: January 28, 2022, 10:11:38 PM »
I haven't tried to compile on Fedora, but anyway, I can try to help. 

The file setup.h shold be created automatically with the make package command.

You should see something like this in your build log (when building for the first time):
config.status: creating lib/wx/include/gtk3-unicode-static-3.0/wx/setup.h

Looking at your compiler log, it looks like the compiler is searching for this file in the wrong location.
On my system (Ubuntu) this file can be found in the following location:
./scopefun-software/lib/wxWidgets-3.0.5/sfBuildRelease/lib/wx/include/gtk3-unicode-static-3.0/wx/setup.h

I'm not sure why your compiler can't find this file. Maybe you can check the full build log, to find some clue. Please check if you installed the GTK3-dev library.

Re: Compilation issues on Fedora 35
« Reply #2 on: January 31, 2022, 11:26:37 AM »
Thank you for the notes, when review the build log, there were some refferences to gtk2, which looked strangely as it uses gtk3 (if I understand it correctly) , so I removed gtk2 devel package(s) from my system and cleanup the scopefun-software directory and now it seems that the build process passed correctly.

I have two additional questions:

What is the correct installation procedure on non-debian like distro? I see, that it generated *.deb package, *.tar.gz tarbal and shell script. When I tried to explore/run the shell script, it tries to install it by default somewhere to the build directory and if I passed --prefix=/opt parameter, it installs it to /opt/ScopeFun-2.1.0-Linux/ directory, but when I try to run the scopefun command, it shows some error message, that hardware.json file was not found (I didn't capture screenshot, so I don't have the exact message). So I manually copied all the relevant files to /bin, /lib/ and /usr/share and now it seems to works.

And the second question - I built it from develop branch (commit 506149de7), but it shows version 2.1.0 (in the file name: ScopeFun-2.1.0-Linux and also in the About dialog in the UI) - is that correct?

*

Dejan

  • *****
  • 150
    • View Profile
Re: Compilation issues on Fedora 35
« Reply #3 on: January 31, 2022, 11:59:57 AM »
Actually there is currently no official install procedure on non-debian like distros. Only Ubuntu installation package is provided with each release...  I will need to check for other distros and maybe consider adding some instructions in the download section of the web site.

Anyway, If you are using the shell script to install the files, all files will be extracted to the build directory as you already noted. In this case, you must copy the files to system folders manually, or the software can not find the required files (the error message you are getting is because the program can not find the file hardware.json in /usr/lib/oscilloscope/data/startup)

Copy all files/folders from ./lib/oscilloscope to "/usr/lib"
cp -r ./lib/oscilloscope /usr/lib
Copy executable "scopefun" to /usr/bin
cp ./bin/scopefun /usr/bin/

To answer your second qestion -- the About dialog will show the version that is entered in cmake step of the build process (note the variables: SCOPEFUN_VERSION_MAJOR, SCOPEFUN_VERSION_MINOR, SCOPEFUN_VERSION_MICRO)
« Last Edit: January 31, 2022, 12:01:33 PM by Dejan »

Re: Compilation issues on Fedora 35
« Reply #4 on: February 02, 2022, 11:17:10 AM »
Thank you for your quick and comprehensive response. I'm thinking if I'll be able to help with the build process on Fedora, but not sure, if I'll have enough time and also my knowledge is quite limited.

Thank you for the amazing work done!

*

lkjbs

  • *
  • 13
    • View Profile
Re: Compilation issues on Fedora 35
« Reply #5 on: February 02, 2022, 04:27:47 PM »
I'm not sure if this will be helpful or not, but I also had issues trying to compile on arch linux, see discussion here https://www.scopefun.com/smf/index.php?topic=124.0

In fact, interestingly, I got a very similar error message you did. Compiling on a clean arch vm worked, so I assume the issue has something to do with a dirty build environment. But, unfortunately, I haven't been able to pinpoint the issue.

Thank you for your quick and comprehensive response. I'm thinking if I'll be able to help with the build process on Fedora, but not sure, if I'll have enough time and also my knowledge is quite limited.

Thank you for the amazing work done!