git build failing with libsimage.so [SOLVED]

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

git build failing with libsimage.so [SOLVED]

Post by clytle374 »

This just showed up today with the current git source on Gentoo Linux. Only change to system was a git pull and a system up date to simage-1.8.0-r1 from simage-1.8.0

Obviously I'm not sure if the new simage has a bug, or freecad has an issue with a newer version. But here is the failure.

Code: Select all

[ 23%] Linking CXX executable ../../bin/FreeCAD

/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsimage.so.20: undefined reference to `sf_open'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsimage.so.20: undefined reference to `sf_seek'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsimage.so.20: undefined reference to `sf_close'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsimage.so.20: undefined reference to `sf_read_double'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsimage.so.20: undefined reference to `sf_command'
collect2: error: ld returned 1 exit status
make[2]: *** [src/Main/CMakeFiles/FreeCADMain.dir/build.make:137: bin/FreeCAD] Error 1
make[1]: *** [CMakeFiles/Makefile2:2636: src/Main/CMakeFiles/FreeCADMain.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Thanks
Cory
Last edited by clytle374 on Sun Mar 07, 2021 10:13 pm, edited 1 time in total.
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: git build failing with libsimage.so

Post by clytle374 »

Git source from a week ago doesn't fail even with updated libsimage. Will run bisect if requested.
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: git build failing with libsimage.so

Post by waebbl »

Hi @clytle374, this issue should have been resolved with the revbump of simage.
Would you please post the output of lddtree /usr/lib64/libsimage.so and emerge -pv simage?
TIA
bookwood
Posts: 7
Joined: Sat Apr 25, 2020 5:39 pm
Location: Dortmund

Re: git build failing with libsimage.so

Post by bookwood »

Hi, I use also Gentoo Linux and compiled my last version on 2020-12-23:

Code: Select all

OS: Gentoo/Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23520 (Git)
Build type: Release
Branch: (HEAD detached at refs/git-r3/HEAD)
Hash: d89cd953a2e785b628c89ad75e2f2182f8413736
Python version: 3.7.9
Qt version: 5.15.1
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
After a system update I also could not compile the current version and have the same error. I modified the current ebuild to check out the above d89cd.. commit hash and it failed with the same error. So I think it is an Gentoo Linux problem.
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: git build failing with libsimage.so

Post by waebbl »

bookwood wrote: Thu Dec 31, 2020 10:52 am After a system update I also could not compile the current version and have the same error. I modified the current ebuild to check out the above d89cd.. commit hash and it failed with the same error. So I think it is an Gentoo Linux problem.
I also think it's a Gentoo issue, but it's most likely not an issue with the freecad ebuild, as this doesn't depend on simage. The only package in the depgraph of freecad, which I'm aware of, that is dependant on simage is coin. And the coin ebuild does not enforce any USE flags on simage.

I just rebuild simage without sndfile support and there's no reference to libsndfile in ldd output at all. Another possibility might be if someone builds with FEATURES=test, libsndfile is pulled in unconditionally and might be linked to the library as well, though I havent' checked the latter.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: git build failing with libsimage.so

Post by wmayer »

The simage library is a plugin that is dynamically loaded at runtime. Neither Coin3d nor FreeCAD is supposed to link to it. As it obviously does it's a Gentoo specific problem.
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: git build failing with libsimage.so

Post by waebbl »

wmayer wrote: Thu Dec 31, 2020 11:31 am The simage library is a plugin that is dynamically loaded at runtime. Neither Coin3d nor FreeCAD is supposed to link to it. As it obviously does it's a Gentoo specific problem.
Coin3d is configurable to use runtime linking (https://github.com/coin3d/coin/blob/mas ... ts.txt#L91) or buildtime linking (https://github.com/coin3d/coin/blob/mas ... s.txt#L372) against simage. The runtime linking options for coin are switched off, the reason for this I don't know, I'm not the maintainer of that package.
bookwood
Posts: 7
Joined: Sat Apr 25, 2020 5:39 pm
Location: Dortmund

Re: git build failing with libsimage.so

Post by bookwood »

Yesterday, I installed the new media-libs/simage-9999 ebuild from the waebbl overlay. It build and runs successful:

Code: Select all

>>> Emerging (1 of 1) media-gfx/freecad-9999::waebbl
>>> Installing (1 of 1) media-gfx/freecad-9999::waebbl
>>> Jobs: 1 of 1 complete                           Load avg: 6.5, 10.1, 10.6
>>> Auto-cleaning packages...

OS: Gentoo/Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23566 (Git)
Build type: Gentoo
Branch: (HEAD detached at refs/git-r3/HEAD)
Hash: f9bcfada1a8c93277ac3118350baa5926ab3f48c
Python version: 3.7.9
Qt version: 5.15.1
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)

Thx to Weabbl for his great work!
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: git build failing with libsimage.so

Post by waebbl »

It should also work with the simage-1.8.0-r1 from ::gentoo. I can't yet reproduce the issue using this version. I yesterday built 1.8.0-r1 without sndfile support and my not yet merged 0.19 branch of the freecad ebuild built just fine.
clytle374
Posts: 172
Joined: Wed Nov 06, 2013 3:58 am

Re: git build failing with libsimage.so

Post by clytle374 »

Sorry everyone, I didn't get notified of the responses. Subscribed isn't the same as notify, I know this now.

Code: Select all

freecad2 $ lddtree /usr/lib64/libsimage.so
libsimage.so => /usr/lib64/libsimage.so (interpreter => none)
    libgif.so.7 => /usr/lib64/libgif.so.7
    libjpeg.so.62 => /usr/lib64/libjpeg.so.62
    libvorbisfile.so.3 => /usr/lib64/libvorbisfile.so.3
        libvorbis.so.0 => /usr/lib64/libvorbis.so.0
            libm.so.6 => /lib64/libm.so.6
                ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libogg.so.0 => /usr/lib64/libogg.so.0
    libpng16.so.16 => /usr/lib64/libpng16.so.16
        libz.so.1 => /lib64/libz.so.1
    libtiff.so.5 => /usr/lib64/libtiff.so.5
    libc.so.6 => /lib64/libc.so.6

And emerge -pv simage

Code: Select all

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/simage-1.8.0-r1::gentoo  USE="gif jpeg png qt5 tiff vorbis -debug -sndfile -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Only reason I know that some change in freecad triggered the failure is that I am running 2 machines and the system update of simage on the second machine didn't fail freecad build until I did a git pull on freecad.

Let me know what I can do it diagnose this.
Thanks
Cory
Post Reply