Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
evolution-data-server gcc undefined reference [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Mon Sep 17, 2018 7:44 pm    Post subject: evolution-data-server gcc undefined reference [solved] Reply with quote

Hi, i have an issue and i don`t know the solution:

Quote:
/usr/lib64/libwebkit2gtk-4.0.so.37: undefined reference to `__divmodti4@GCC_7.0.0'
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/usr/lib64/python3.5/distutils/unixccompiler.py", line 200, in link
self.spawn(linker + ld_args)
File "/usr/lib64/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib64/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib64/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 278, in _link
args)
File "/usr/lib64/gobject-introspection/giscanner/ccompiler.py", line 258, in link
extra_postargs=extra_postargs)
File "/usr/lib64/python3.5/distutils/unixccompiler.py", line 202, in link
raise LinkError(msg)
distutils.errors.LinkError: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/g-ir-scanner", line 66, in <module>
sys.exit(scanner_main(sys.argv))
File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 547, in scanner_main
shlibs = create_binary(transformer, options, args)
File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 422, in create_binary
gdump_parser.get_error_quark_functions())
File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 329, in compile_introspection_binary
return dc.run()
File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 175, in run
self._link(bin_path, introspection_obj)
File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 297, in _link
raise LinkError(e)
distutils.errors.LinkError: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit status 1
/usr/lib64/libwebkit2gtk-4.0.so.37: undefined reference to `__divmodti4@GCC_7.0.0'
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/usr/lib64/python3.5/distutils/unixccompiler.py", line 200, in link
self.spawn(linker + ld_args)
File "/usr/lib64/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib64/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib64/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 278, in _link
args)
File "/usr/lib64/gobject-introspection/giscanner/ccompiler.py", line 258, in link
extra_postargs=extra_postargs)
File "/usr/lib64/python3.5/distutils/unixccompiler.py", line 202,


It seems to be a reference on an old gcc Part. I have just gcc-7.3.0 installed but did not unemerge the previous compilers with --deep attribute. Every Version of Evolution will fail with that Message, even the installed Version.

Google for __divmodti4 throws some gcc 4.9.x Configurations. I rebuild gcc, run revdep-rebuild, run the fix-lib-script with the previous Version (6.4.0-r1)

Rebuild Webkitgtk, rebuild all gobject-introspection and gobject-instrospection-common run an emerge -pvD1u evolution ... used minior Versions.. or wait for the update yesterday to 3.26.6.

think i try to run a whole world rebuild in the next days. Any hints or suggestions are welcome.

https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/spu/divmodti4.c This should bethe file which is "missing". But i do not understand the function. Maybe some division modulo optimization function!?

No clue why this was or is in my gcc Installation. Update: Looks like i had installed gcc-7.0.0 in its unstable Days. And i thought 7.3.0 is just a minior Update. I thought its enough to switch instead of rebuild. Since its the same Major Version (7.0) of the Compiler i did not rebuild important packages and got a Mix on that Computer. The best i can do is to rebuild the full Toolchain or switch to the next Version 8.x and rebuild the Toolchain and System.

Edit: Strange... https://fossies.org/linux/gcc/libgcc/ChangeLog shows that gcc-7.3.0 should have a __divmodti4 file.

Code:
[I] sys-devel/gcc
     Verfügbare Versionen:   
     (2.95.3) [M]~*2.95.3-r10^s
     (3.3.6) [M]~3.3.6-r1^s
     (3.4.6) [M]3.4.6-r2^s
     (4.0.4) [M]**4.0.4^s
     (4.1.2) [M]4.1.2^s
     (4.2.4) [M]~4.2.4-r1^s
     (4.3.6) [M]4.3.6-r1^s
     (4.4.7) [M]4.4.7^s
     (4.5.4) [M]4.5.4^s
     (4.6.4) [M]4.6.4^s
     (4.7.4) [M]4.7.4-r1^s
     (4.8.5) [M]4.8.5-r1^s
     (4.9.4) [M]4.9.4^s
     (5.4.0) [M]5.4.0-r4^s
     (6.4.0) 6.4.0-r1^s ~6.4.0-r3^s
     (7.3.0) 7.3.0-r3^s ~7.3.0-r4^s
     (8.2.0) ~8.2.0-r2^s
       {altivec awt boundschecking cilk +cxx d debug doc fixed-point +fortran gcj go graphite hardened jit libssp mpx mudflap multilib +nls nopie nossp +nptl objc objc++ objc-gc +openmp +pch pgo +pie regression-test +sanitize +ssp systemtap vanilla +vtv}
     Installierte Versionen: 7.3.0-r3(7.3.0)^s(19:19:58 17.09.2018)(cxx fortran multilib nls nptl openmp pch pie sanitize ssp vtv -altivec -cilk -debug -doc -fixed-point -go -graphite -hardened -jit -libssp -mpx -objc -objc++ -objc-gc -pgo -regression-test -vanilla)
     Startseite:             https://gcc.gnu.org/
     Beschreibung:           The GNU Compiler Collection


Last edited by ChrisJumper on Thu May 16, 2019 10:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Tue Sep 18, 2018 10:44 pm    Post subject: Reply with quote

But what i not understand is: Why could i emerge webkit-gtk with only Compiler 7.3, and the missing __divmodti Symbol but the library complaining later as Symbol is not reference able, if the compiler try to link the packages with?

I have no Runtime Issues with that webkit-gtk Version. Which load the dynamic Linked Version of the previous evolution-data-server build too.

Before i thought, its just a Reference in the linked Package, that the compiler try to include because its somewhere in the Standard-Folders.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Wed Sep 19, 2018 12:52 am    Post subject: Reply with quote

Shared libraries can be successfully linked without resolving all used symbols, and some are even designed to require that capability. The undefined reference is only fatal when it is loaded and the symbol still cannot be resolved.
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Mon Sep 24, 2018 8:11 pm    Post subject: Reply with quote

Hu wrote:
Shared libraries can be successfully linked without resolving all used symbols, and some are even designed to require that capability. The undefined reference is only fatal when it is loaded and the symbol still cannot be resolved.


I done today an upate to gcc-8.2.0, an unemerge deepclean of gcc-7.3.0 and an emerge -e --usepkg=n @system.

Still got that error. Next Week i try to update World.

What should or Could i do if the Error Remains?

Can i generate a list or automatic search for that Symbol in the Source/Code or Header?

I think its hard because the Code for example of webkitsgtk is just available if i unpack this package during compilation.

Or can i map (like with ln -s) this special Symbol and Version of __divmodti @gcc-7.3.0 to __divmodti@gcc-8.2.0?
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Mon Oct 01, 2018 7:23 pm    Post subject: Reply with quote

:cry:

No Way. I upgrade to gcc 8.2.x and remove gcc as described in in the gcc-upgrade howto and rebuild -e --usepkg=n system and -e --usepkg=n world. And i had no Luck.

Still the same error message. Before i removed webkit-gtk.

What do i wrong? It have to be the way the include files got loaded through directories for webkit-gtk.
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Sat Oct 27, 2018 10:20 pm    Post subject: Reply with quote

Hello, did not solved this yet. Because i am lazy and searched for some low hanging fruit solution. But there is not really one.

(Sure i can do a re-setup of that system.. but will loose some data.)

To Understand the Stuff with the hidden Symbols and gcc and some dynamic shared Objects.. read the follow Links:


https://stackoverflow.com/questions/23696585/what-does-exactly-the-warning-mean-about-hidden-symbol-being-referenced-by-dso
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

However and what i not understood:

On the System without issues, compiling the Package i have some libwebkit2gtk like this:

Code:
# objdump -T  /usr/lib64/libwebkit2gtk-4.0.so | grep -i gcc
0000000000000000      DF *UND*  0000000000000000  GCC_4.0.0   __divdc3
0000000000000000      DF *UND*  0000000000000000  GCC_4.0.0   __muldc3
0000000000000000      DF *UND*  0000000000000000  GCC_7.0.0   __divmodti4


And i think i have no gcc_4.0 x installed or GCC_7.0.0... but the emerge did not stop. It just complete the Linking without issue.

Is that because i did not re-compile the whole system with the new compiler?

Edit: Running the following in the work/build folder of the faild evolution i got:
Code:
# scanelf -l -s __divmodti4 | grep -I '__divmodti4'
ET_DYN __divmodti4 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc_s.so.1
ET_DYN __divmodti4 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1
ET_DYN __divmodti4 /usr/lib64/libwebkit2gtk-4.0.so.37.33.3


Still not sure why this breaks the compilation. I retry to rebuild the gcc, glibc (but i think its not involved) and webkit-gtk, this time without distccd.
My issue looks like a bad luck update from one compiler to another and so on.. if the compilers where slotted, and there libggc_s.so.1 still on my system think the error would not appear. That 7.0.0 is now gone and 7.3.0 still there.. is bad luck. even i try to create a symlink from gcc folder 7.3.0 to 7.0.0 but that did not work.
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Thu May 16, 2019 10:52 pm    Post subject: Reply with quote

Today its Solved.

The Error was still there in gnome-evolution 3.30.5. But...

I upgrade gcc to 8.3.
Rebuild the Toolchain.
Rebuild the binutils und binutils-libs
Rebuild gcc 8.3
Rebuild libtool.
Rebuild icu.
Rebuild Harfbuzz.
Rebuild webkit-gtk2.

evolution-data-servers build fine.
evolution itself not.

However. Disabling all Useflags and evolution builds fine.
Enabling some Useflags. (Ok i still have weather disabled! Will check a rebuild with this flag later too.) And it works.

If you have a situation like this. Try fix my gentoo or use a Backup and migrate them to a clean full new gentoo-Setup. Its not worth the trouble.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum