Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libappimage fails to compile on FreeBSD #149

Open
probonopd opened this issue Sep 8, 2020 · 4 comments
Open

libappimage fails to compile on FreeBSD #149

probonopd opened this issue Sep 8, 2020 · 4 comments

Comments

@probonopd
Copy link
Member

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
Copy link
Member

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

@probonopd
Copy link
Member Author

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

@probonopd probonopd changed the title libappimage fails to compile on FreeBSD, b2 not found libappimage fails to compile on FreeBSD Sep 9, 2020
@TheAssassin
Copy link
Member

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
Copy link

darealshinji commented Jun 26, 2023

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..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants