Skip to content

Cannot build with internal squash #1185

Closed

Description

@blackPantherOS

Gcc-11.2

When :

-DUSE_SYSTEM_SQUASHFUSE:BOOL=OFF

Then:

 [60%] Linking C executable runtime
cd /usr/src/RPM/BUILD/AppImageKit/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/runtime.dir/link.txt --verbose=1
/usr/bin/cc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -lappimage -rdynamic -s -ffunction-sections -fdata-sections -flto CMakeFiles/runtime.dir/notify.c.o runtime.4.o -o runtime  -ldl -lpthread ../lib/libappimage/src/libappimage_shared/libappimage_shared.a ../lib/libappimage/src/libappimage_hashlib/libappimage_hashlib.a ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse.a ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libfuseprivate.a -llzma -lz 
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll.o):(.bss+0x0): multiple definition of `libhandle'; runtime.4.o:(.bss.libhandle+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll.o):(.bss+0x8): multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll.o):(.bss+0x10): multiple definition of `load_library_errmsg'; runtime.4.o:(.bss.load_library_errmsg+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll_inode.o):(.bss+0x0): multiple definition of `libhandle'; runtime.4.o:(.bss.libhandle+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll_inode.o):(.bss+0x8): multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-ll_inode.o):(.bss+0x10): multiple definition of `load_library_errmsg'; runtime.4.o:(.bss.load_library_errmsg+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-nonstd-daemon.o):(.bss+0x0): multiple definition of `libhandle'; runtime.4.o:(.bss.libhandle+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-nonstd-daemon.o):(.bss+0x8): multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libsquashfuse_ll_la-nonstd-daemon.o):(.bss+0x10): multiple definition of `load_library_errmsg'; runtime.4.o:(.bss.load_library_errmsg+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x0): multiple definition of `libhandle'; runtime.4.o:(.bss.libhandle+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x8): multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
/usr/bin/ld: ../lib/libappimage/squashfuse-EXTERNAL-prefix/src/squashfuse-EXTERNAL/.libs/libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x10): multiple definition of `load_library_errmsg'; runtime.4.o:(.bss.load_library_errmsg+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/runtime.dir/build.make:145: src/runtime] Error 1

The Squashfuse git tag is old: 1f98030 The patches cannot applied to latest squashfuse....
and

When:

-DUSE_SYSTEM_MKSQUASHFS:BOOL=OFF

Then:

[ 15%] No patch step for 'mksquashfs'
[ 17%] Performing configure step for 'mksquashfs'
[ 18%] Performing build step for 'mksquashfs'
/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: read_fs.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: action.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: action.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: sort.o:(.bss+0x100000): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: sort.o:(.bss+0x100008): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: info.o:(.bss+0x10): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: info.o:(.bss+0x8): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: restore.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: restore.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: process_fragments.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: process_fragments.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
/usr/bin/ld: xattr.o:(.bss+0x8): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
/usr/bin/ld: xattr.o:(.bss+0x10): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here

The mksquashfs git-tag is old: 4.4 ==> build with 4.5 seems succesful

Activity

  1. added a commit that references this issue on Sep 17, 2022
  2. theofficialgman commented on Dec 11, 2023

    @theofficialgman

    Running into these issues as well. Updating to latest squashfs sed -i 's/4.4/4.6.1/g' cmake/dependencies.cmake fixes the second issue but the first issue is still a problem.

  3. theofficialgman commented on Dec 11, 2023

    @theofficialgman

    duplicate of #1084

  4. alphin-tosil commented on Aug 19, 2024

    @alphin-tosil

    The error message indicates that fwriter_buffer and bwriter_buffer are defined in multiple object files (mksquashfs.o and process_fragments.o), which is causing a conflict during the linking stage.

    Identify the file where you want to define the variables "fwriter_buffer" and "bwriter_buffer"
    In the corresponding header file (e.g., mksquashfs.h), declare the variables as extern

    Modify Your Code in In "mksquashfs.c":
    struct cache *bwriter_buffer;
    struct cache *fwriter_buffer;

    In mksquashfs.h:
    extern struct cache *bwriter_buffer;
    extern struct cache *fwriter_buffer;

    in "process_fragments.c"
    extern struct cache *bwriter_buffer;
    extern struct cache *fwriter_buffer;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions