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

Add a compilation fix for mksquashfs #952

Closed
wants to merge 1 commit into from

Conversation

jpcima
Copy link

@jpcima jpcima commented Apr 26, 2019

Hi. I add a patch to permit build on a distribution where mksquashfs fails. (Arch Linux)
Without a particular header included, the macros major and minor are not present.

@TheAssassin
Copy link
Member

Are you absolutely sure there's no compiler flag or anything so we really need a patch?
(Just curious, will research myself a bit, too.)

JFYI, building AppImages on Arch Linux is a bad idea, see https://docs.appimage.org/introduction/concepts.html#build-on-old-systems-run-on-newer-systems.

@probonopd
Copy link
Member

@jpcima are there specific reasons you want to build AppImageKit yourself rather than using the tested binaries that we provide?

@jpcima
Copy link
Author

jpcima commented Apr 26, 2019

Are you absolutely sure there's no compiler flag or anything so we really need a patch?

I know for a fact that Arch Linux patches the package squashfs-tools with the indicated header.
Without the change, there is a build error.

This is from my terminal some minutes ago, not in english, sorry about this detail.

mksquashfs.c:996:24: error: l'objet « major » appelé n'est pas une fonction ou un pointeur de fonction
   unsigned int major = major(buf->st_rdev);

JFYI, building AppImages on Arch Linux is a bad idea, see

I try to get acquainted with the toolset for the first time.
I attempted to build from distro provided recipes, and the build problem happened. But, I understand your point completely.

are there specific reasons you want to build AppImageKit yourself rather than using the tested binaries that we provide?

None, I had not noticied that such existed.

@probonopd
Copy link
Member

Please use our binaries if possible. They get built on CentOS 6 specifically to be compatible with a wide range of distributions. There is usually no need to compile AppImageKit unless you want to develop it.

Also, if you want to make an AppImage, then please use the oldest still-supported LTS distribution (e.g., Ubuntu xenial) so that the resulting AppImage will be able to run on more than just the latest bleeding-edge systems.

@TheAssassin
Copy link
Member

We can still merge this PR to allow for building the software on newer distros, mainly for development purposes.

@probonopd
Copy link
Member

I am hesitant with such patches that change something which I don't understand. Currently it is working for us but merging this now adds a chance of breaking something. Hence it's a possible pain with no gain.

The situation may change if we ever want to build on anything else than CentOS 6, which I don't foresee anytime soon. Let's reconsider then.

@jpcima
Copy link
Author

jpcima commented Apr 28, 2019

As you want, in this case I'll close here, and I take over Arch package maintainership to include this fix.

@jpcima jpcima closed this Apr 28, 2019
@JuPlutonic
Copy link

JuPlutonic commented Jun 16, 2019

Are you absolutely sure there's no compiler flag or anything so we really need a patch?
(Just curious, will research myself a bit, too.)

JFYI, building AppImages on Arch Linux is a bad idea, see https://docs.appimage.org/introduction/concepts.html#build-on-old-systems-run-on-newer-systems.

There is no "AppImage" for AppImageKit (14.04 compiled version). Maybe my google-fu is low to find AppImageKit and bypass compilation.
PS Thanks for patch that works with last cmake / Ubuntu 19.04 😃

@JuPlutonic
Copy link

The src/mksquashfs-build-fix.patch not presented in master branch!!!!

@TheAssassin
Copy link
Member

There is no "AppImage" for AppImageKit (14.04 compiled version). Maybe my google-fu is low to find AppImageKit and bypass compilation.

https://github.com/AppImage/AppImageKit/releases/tag/continuous

@JuPlutonic
Copy link

JuPlutonic commented Jun 16, 2019

Error after PR:

LANGUAGE=en_US.utf-8 LANG=en_US.utf-8 LC_ALL=en_US.utf-8 make -j$(nproc)
[  1%] Performing build step for 'mksquashfs'
[  4%] Built target xdg-basedir
[ 16%] Built target squashfuse-EXTERNAL
[ 19%] Built target libappimage_hashlib
[ 22%] Built target gtest
[ 27%] Built target libappimage_shared
[ 30%] Built target AppRun
[ 33%] Built target gtest_main
[ 36%] Built target test-xdg-basedir
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
[ 51%] Built target runtime
[ 54%] Built target validate
[ 57%] Built target digest
[ 60%] Built target test_shared
[ 69%] Built target libappimage_static
[ 75%] Built target appimagetool
[ 83%] Built target libappimage
mksquashfs.c: In function ‘create_inode’:
mksquashfs.c:996:24: error: called object ‘major’ is not a function or function pointer
   unsigned int major = major(buf->st_rdev);
                        ^~~~~
mksquashfs.c:996:16: note: declared here
   unsigned int major = major(buf->st_rdev);
                ^~~~~
mksquashfs.c:997:24: error: called object ‘minor’ is not a function or function pointer
   unsigned int minor = minor(buf->st_rdev);
                        ^~~~~
mksquashfs.c:997:16: note: declared here
   unsigned int minor = minor(buf->st_rdev);
                ^~~~~
mksquashfs.c:1020:24: error: called object ‘major’ is not a function or function pointer
   unsigned int major = major(buf->st_rdev);
                        ^~~~~
mksquashfs.c:1020:16: note: declared here
   unsigned int major = major(buf->st_rdev);
                ^~~~~
mksquashfs.c:1021:24: error: called object ‘minor’ is not a function or function pointer
   unsigned int minor = minor(buf->st_rdev);
                        ^~~~~
mksquashfs.c:1021:16: note: declared here
   unsigned int minor = minor(buf->st_rdev);
                ^~~~~
[ 86%] Built target test_desktop_integration
[ 89%] Built target test_libappimage
mksquashfs.c: In function ‘dir_scan2’:
mksquashfs.c:3559:17: warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration]
   buf.st_rdev = makedev(pseudo_ent->dev->major,
                 ^~~~~~~
make[3]: *** [<builtin>: mksquashfs.o] Error 1
make[2]: *** [CMakeFiles/mksquashfs.dir/build.make:116: mksquashfs-prefix/src/mksquashfs-stamp/mksquashfs-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/mksquashfs.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

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

Successfully merging this pull request may close these issues.

None yet

4 participants