pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Building www/webkit-gtk: undefined reference to `__divmodti4'

While building www/webkit-gtk from pkgsrc-2019Q3, it failed close to the
end of the build like this:

[100%] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-32.cpp.o
[100%] Linking CXX shared library ../../lib/
../../lib/libWTFGTK.a(MediaTime.cpp.o): In function `WTF::MediaTime::setTimeScale(unsigned int, WTF::MediaTime::RoundingFlags)':
MediaTime.cpp:(.text+0xb13): undefined reference to `__divmodti4'
collect2: error: ld returned 1 exit status
gmake[2]: *** [Source/WebKit/CMakeFiles/WebKit.dir/build.make:7468: lib/] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1255: Source/WebKit/CMakeFiles/WebKit.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2
*** Error code 2

make[1]: stopped in /mnt/vol1/rhialto/cvs/pkgsrc/www/webkit-gtk

Now this symbol __divmodti4 is supposed to be present in libgcc.a, so
there seemed to be some problem with locating it.

I examined .work.log and noticed a -specs option added at to the end of the
command line:


Looking into that file it showed some stuff about linking libgcc and a
directory name related to gcc7, but not a correct location for libgcc.a.
Unfortunately, various attempts at manipulating the file to use the
correct directory didn't help.

I ran by hand the (very long) command but with just -lgcc added at the
end, and then linking succeeded (so seemingly the specs file was a red
herring). I got a built package after also adding the 2 usual shared
library symlinks and re-running make.

What I don't understand is why this problem occurs here. I first saw it
before I compiled with gcc7 (but with 8.1's stock gcc) but changing
compilers (which I did for unrelated reasons) did not make a difference.
I can't really believe that this is the first package that actually uses
anything from libgcc.a in a shared library, either.

Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index