drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
209 stars 52 forks source link

Build/compile robustness - does not compile out of the box on latest linux machines, as-is #747

Closed LouisJB closed 1 month ago

LouisJB commented 1 month ago

Contact Details

LouisJb

Feature for this project

trouble building on latest linux (debian, devuan testing) due to a compiler error, it might be versions of c issue (c99 / other?) but anyway should build out of the box and does not,

cmake --version cmake version 3.28.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

commit ac960731dde827b3791d7a485c6941a92638c098 (HEAD -> master, origin/master, origin/HEAD) Author: Mooneer Salem mooneer@gmail.com Date: Thu Sep 12 19:29:28 2024 +0000

latest user manual PDF

USER_MANUAL.html | 1 + USER_MANUAL.pdf | Bin 1117994 -> 1116968 bytes 2 files changed, 1 insertion(+)

./build_linux.sh ... [ 6%] Building C object _deps/wxwidgets-build/libs/CMakeFiles/wxzlib.dir////src/zlib/gzlib.c.o cd /home/louis/radio/tools/freedv/freedv-gui/build_linux/_deps/wxwidgets-build/libs && /usr/bin/cc -DGIT_HASH=\"ac960731\" -D_FILE_OFFSET_BITS=64 -D_UNICODE -I/home/louis/radi o/tools/freedv/freedv-gui/build_linux/_deps/wxwidgets-build/lib/wx/include/gtk3-unicode-static-3.2 -Wall -g -fPIC -pthread -MD -MT _deps/wxwidgets-build/libs/CMakeFiles/wxzlib .dir////src/zlib/gzlib.c.o -MF CMakeFiles/wxzlib.dir////src/zlib/gzlib.c.o.d -o CMakeFiles/wxzlib.dir////src/zlib/gzlib.c.o -c /home/louis/radio/tools/freedv /freedv-gui/build_linux/_deps/wxwidgets-src/src/zlib/gzlib.c /home/louis/radio/tools/freedv/freedv-gui/build_linux/_deps/wxwidgets-src/src/zlib/gzlib.c: In function ‘gz_open’: /home/louis/radio/tools/freedv/freedv-gui/build_linux/_deps/wxwidgets-src/src/zlib/gzlib.c:14:17: error: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimp licit-function-declaration] 14 | # define LSEEK lseek | ^~~~~ /home/louis/radio/tools/freedv/freedv-gui/build_linux/_deps/wxwidgets-src/src/zlib/gzlib.c:254:9: note: in expansion of macro ‘LSEEK’ 254 | LSEEK(state->fd, 0, SEEK_END); / so gzoffset() is correct / | ^~~~~

VHF/UHF

None

Deprecated features

None

Non-standard compiler

None

Non-standard compiler

None

Implementation assistance

happy to retry compiling it or if a simple solution that should be documented happy to help update the readme docs

Support assistance

it's a bug fix/improvement, once made it should be better and done

tmiw commented 1 month ago

This looks like an issue inside wxWidgets, not FreeDV proper. However, I seem to remember @Tyrbiter or @barjac running into this before, so hopefully they have some feedback to get you past this.

Tyrbiter commented 1 month ago

Initially I would suggest looking through the closed issues for freedv-gui. There could be something there that I have forgotten.

I had a problem where I did not update the spec file on Fedora and accidentally built using wxWidgets 3.0 instead of 3.2 at a time when Fedora had both versions available, which it now doesn't if you use a current supported release.

I'm not very familiar with the Debian way of doing things, and know nothing of Devuan and how it might differ from how Fedora builds software.

tmiw commented 1 month ago

Looks like 3.2 is getting used here. Additionally, the build system only tries to build wxWidgets if its packages aren't installed.

@LouisJB, try sudo apt install libwxgtk3.2-dev, remove/recreate your build folder and then try to run ./build_linux.sh again and see how that goes.

LouisJB commented 1 month ago

thanks so much - I will give that a try and let you know. Debian etc should be very similar to other linux distro (including fedora) and generally but I am running very latest aka 'testing' versions also with almost daily updates so sometimes packages do get misaligned with latest vs. lts mainline packaging. I will check on the libwgtk3.2-dev in more details. Anyway, will try the suggestions and will get back to you on it - thank you!

LouisJB commented 1 month ago

yes I do think that fixed it, thanks all - nice work.

sudo apt install libwxgtk3.2-dev rm -rf build_linux git status git pull ./build_linux.sh ... [100%] Built target freedv

thanks again!

tmiw commented 1 month ago

No worries, glad that helped!