AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

libappimage fails to compile on FreeBSD #149

Open probonopd opened 3 years ago

probonopd commented 3 years ago

libappimage fails to compile on FreeBSD:

[ 28%] Performing build step for 'boost-EXTERNAL'
/bin/sh: ./b2: not found
*** Error code 127

Stop.
make[2]: stopped in /usr/home/user/libappimage/build
*** Error code 1

But it has been compiled:

user@FreeBSD$ find /home/user/libappimage/ -name b2
/home/user/libappimage/build/boost-EXTERNAL-prefix/src/boost-EXTERNAL/tools/build/src/engine/bin.freebsdx86_64/b2

So maybe just a path needs to be adjusted somewhere?

I can provide shell access to a FreeBSD machine with all the tools needed if required.

TheAssassin commented 3 years ago

As a workaround, try installing boost in the system and then call with cmake -DUSE_SYSTEM_BOOST=On.

probonopd commented 3 years ago

Thanks, that brings us a step further, now stopping at

[ 36%] Performing configure step for 'squashfuse-EXTERNAL'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: linking file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
configure.ac:8: installing 'build-aux/compile'
configure.ac:6: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
^[^Nlibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:8: installing 'build-aux/compile'
configure.ac:6: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
sed: 1: "configure": command c expects \ followed by text
*** Error code 1

Stop.
make[2]: stopped in /usr/home/user/libappimage/build
*** Error code 1

Stop.
make[1]: stopped in /usr/home/user/libappimage/build
*** Error code 1

Stop.
make: stopped in /usr/home/user/libappimage/build
TheAssassin commented 3 years ago

Those dependencies are all targeted for Linux. This looks like an upstream bug, as in that they expect specific versions of sed & Co. But don't take my word for that.

I don't have the time nor will to support *BSD by the way.

darealshinji commented 1 year ago

You might have to install the GNU versions of sed and other tools: https://www.freshports.org/textproc/gsed/ https://www.freshports.org/devel/gmake/

Update:

I gave it a try. To get around the sed issue I had to install gsed and replace /usr/bin/sed with a link to /usr/local/bin/gsed. Not great, but simply adding gsed as sed to PATH didn't seem to work. I assume configure always picks /usr/bin/sed; configure.ac_ might need the AC_PROG_SED macro to detect the correct version of sed.

Then clang++ gave up somewhere and I had to install and use gcc/g++. Now it fails on libappimage.c because PATH_MAX is undefined. On BSD you have to use MAXPATHLEN instead (or include whatever header defines MAX_PATH?). Will further investigate it later.

Update 2: By replacing PATH_MAX libappimage.so compiles and links without issues. But the test fails at the linking stage with errors about "undefined reference to XdgUtils..."