LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2022, 12:16 PM   #1
cpeognsoelds
LQ Newbie
 
Registered: Feb 2022
Posts: 11

Rep: Reputation: Disabled
glib2 build fails


The environment I am working in is a QNAP NAS with x86_64 architecture running an embedded, QNAP-designed Debian-based busybox Gnu/Linux distro based on kernel 4.14.24.

The key constraint in this environment is that there is no package manager, and the binaries and libraries needed to build and install programs must be installed by the user using the Entware system. Essentially, this creates a parallel development environment in opt/entware

In this environment, I am having trouble building glib2. Glib2 is one of the dependencies required to build GTK3, which I need to build wxWidgets.

I have installed all the dependencies required by glib2, and the configure command completes without errors
Code:
./configure --prefix=/opt --with-libiconv
Make, however, fails with a long list of "multiple definition of x' in gutils, related to .libs/gasyncqueue.o

I would have thought that if these messages is the cause in the build failing, it would have failed after the first one. But that reflects my ignorance.

I don't understand what these messages mean, but these are the last messages before
Code:
ld returned 1 exit status.
Below is the output of make.
I have only included the first few and the last few multiple definitions messages, because the entire output is too long for this post.

Thank you to all for helping me solve this.

Code:
cd . && /bin/sh ./config.status glibconfig.h
config.status: executing glibconfig.h commands
config.status: glibconfig.h is unchanged
echo timestamp > stamp-gc-h
make  all-recursive
make[1]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6'
Making all in .
make[2]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6'
make[2]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6'
Making all in m4macros
make[2]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/m4macros'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/m4macros'
Making all in glib
make[2]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
make  all-recursive
make[3]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
Making all in libcharset
make[4]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/libcharset'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/libcharset'
make[4]: Entering directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
/bin/sh ../libtool --mode=link gcc  -g -O2 -Wall   -o libglib-2.0.la -rpath /opt/lib  -version-info 902:4:902 -export-dynamic  -export-symbols-regex "^[^_].*" garray.lo gasyncqueue.lo gatomic.lo gbacktrace.lo gcache.lo gcompletion.lo gconvert.lo gdataset.lo gdate.lo gdir.lo gerror.lo gfileutils.lo ghash.lo ghook.lo giochannel.lo gkeyfile.lo glist.lo gmain.lo gmappedfile.lo gmarkup.lo gmem.lo gmessages.lo gnode.lo goption.lo gpattern.lo gprimes.lo gqsort.lo gqueue.lo grel.lo grand.lo gscanner.lo gshell.lo gslice.lo gslist.lo gstdio.lo gstrfuncs.lo gstring.lo gthread.lo gthreadpool.lo gtimer.lo gtree.lo guniprop.lo gutf8.lo gunibreak.lo gunicollate.lo gunidecomp.lo gutils.lo gprintf.lo libcharset/libcharset.la  giounix.lo gspawn.lo  -liconv   -lintl
rm -fr  .libs/libglib-2.0.exp .libs/libglib-2.0.ver
generating symbol list for `libglib-2.0.la'
/opt/bin/nm -B  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gscanner.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o  libcharset/.libs/libcharset.a | sed -n -e 's/^.*[        ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /opt/bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp
grep -E -e "^[^_].*" ".libs/libglib-2.0.exp" > ".libs/libglib-2.0.expT"
mv -f ".libs/libglib-2.0.expT" ".libs/libglib-2.0.exp"
echo "{ global:" > .libs/libglib-2.0.ver
 cat .libs/libglib-2.0.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libglib-2.0.ver
 echo "local: *; };" >> .libs/libglib-2.0.ver
 gcc -shared  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gscanner.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o -Wl,--whole-archive libcharset/.libs/libcharset.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/opt/lib -Wl,--rpath -Wl,/opt/lib -liconv /opt/lib/libintl.so  -Wl,-soname -Wl,libglib-2.0.so.0 -Wl,-version-script -Wl,.libs/libglib-2.0.ver -o .libs/libglib-2.0.so.0.902.4
/opt/bin/ld: .libs/gatomic.o: in function `g_bit_nth_lsf':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: multiple definition of `g_bit_nth_lsf'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: first defined here
/opt/bin/ld: .libs/gatomic.o: in function `g_bit_nth_msf':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:290: multiple definition of `g_bit_nth_msf'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:290: first defined here
/opt/bin/ld: .libs/gatomic.o: in function `g_bit_storage':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:305: multiple definition of `g_bit_storage'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:305: first defined here
/opt/bin/ld: .libs/gatomic.o: in function `g_trash_stack_push':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:321: multiple definition of `g_trash_stack_push'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:321: first defined here
.
.
.
.
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:348: multiple definition of `g_trash_stack_peek'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:348: first defined here
/opt/bin/ld: .libs/giounix.o: in function `g_trash_stack_height':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:356: multiple definition of `g_trash_stack_height'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:356: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_bit_nth_lsf':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: multiple definition of `g_bit_nth_lsf'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_bit_nth_msf':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:290: multiple definition of `g_bit_nth_msf'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:290: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_bit_storage':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:305: multiple definition of `g_bit_storage'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:305: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_trash_stack_push':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:321: multiple definition of `g_trash_stack_push'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:321: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_trash_stack_pop':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:329: multiple definition of `g_trash_stack_pop'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:329: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_trash_stack_peek':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:348: multiple definition of `g_trash_stack_peek'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:348: first defined here
/opt/bin/ld: .libs/gspawn.o: in function `g_trash_stack_height':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:356: multiple definition of `g_trash_stack_height'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:356: first defined here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:573: libglib-2.0.la] Error 1
make[4]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
make[3]: *** [Makefile:758: all-recursive] Error 1
make[3]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
make[2]: *** [Makefile:531: all] Error 2
make[2]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib'
make[1]: *** [Makefile:486: all-recursive] Error 1
make[1]: Leaving directory '/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6'
 
Old 02-28-2022, 06:15 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
/opt/bin/ld: .libs/gatomic.o: in function `g_bit_nth_lsf':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: multiple definition of `g_bit_nth_lsf'; .libs/gasyncqueue.o:/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.9.6/glib/../glib/gutils.h:277: first defined here

Edit: looked more closely. g_bit_nth_lsf is both an exported symbol from the library and a macro defined in glib.h. Somehow it is getting included and defined at global scope in multiple places. Not sure how that is happening.

Can you post the output of:

Code:
nm -B .libs/gatomic.o .libs/gasyncqueue.o

Last edited by smallpond; 03-01-2022 at 09:31 AM.
 
Old 03-17-2022, 02:36 PM   #3
cpeognsoelds
LQ Newbie
 
Registered: Feb 2022
Posts: 11

Original Poster
Rep: Reputation: Disabled
OMG, I'm so sorry. I didn't know you had responded (two weeks ago).
Thanks so much for looking more closely.
here is the output you requested
Code:
[~/gdk_files/glib-2.9.6/glib/.libs] # nm -B gatomic.o gasyncqueue.o

gatomic.o:
0000000000000100 T g_atomic_int_add
0000000000000110 T g_atomic_int_compare_and_exchange
00000000000000f0 T g_atomic_int_exchange_and_add
0000000000000150 T g_atomic_int_get
0000000000000160 T g_atomic_int_set
0000000000000120 T g_atomic_pointer_compare_and_exchange
0000000000000170 T g_atomic_pointer_get
0000000000000180 T g_atomic_pointer_set
0000000000000140 T _g_atomic_thread_init
0000000000000000 T g_bit_nth_lsf
0000000000000030 T g_bit_nth_msf
0000000000000060 T g_bit_storage
00000000000000c0 T g_trash_stack_height
00000000000000b0 T g_trash_stack_peek
0000000000000090 T g_trash_stack_pop
0000000000000080 T g_trash_stack_push
0000000000000100 T IA__g_atomic_int_add
0000000000000110 T IA__g_atomic_int_compare_and_exchange
00000000000000f0 T IA__g_atomic_int_exchange_and_add
0000000000000120 T IA__g_atomic_pointer_compare_and_exchange

gasyncqueue.o:
0000000000000000 t g_async_queue_invert_compare
0000000000000b90 T g_async_queue_length
0000000000000c70 T g_async_queue_length_unlocked
00000000000004c0 T g_async_queue_lock
0000000000000250 T g_async_queue_new
0000000000000830 T g_async_queue_pop
0000000000000020 t g_async_queue_pop_intern_unlocked
00000000000008e0 T g_async_queue_pop_unlocked
0000000000000650 T g_async_queue_push
00000000000007a0 T g_async_queue_push_sorted
0000000000000720 T g_async_queue_push_sorted_unlocked
00000000000005a0 T g_async_queue_push_unlocked
0000000000000290 T g_async_queue_ref
0000000000000300 T g_async_queue_ref_unlocked
0000000000000d50 T g_async_queue_sort
0000000000000ce0 T g_async_queue_sort_unlocked
0000000000000a70 T g_async_queue_timed_pop
0000000000000b20 T g_async_queue_timed_pop_unlocked
0000000000000950 T g_async_queue_try_pop
0000000000000a00 T g_async_queue_try_pop_unlocked
0000000000000530 T g_async_queue_unlock
0000000000000360 T g_async_queue_unref
0000000000000440 T g_async_queue_unref_and_unlock
0000000000000160 T g_bit_nth_lsf
0000000000000190 T g_bit_nth_msf
00000000000001c0 T g_bit_storage
                 U _GLOBAL_OFFSET_TABLE_
                 U g_thread_functions_for_glib_use
                 U g_threads_got_initialized
0000000000000220 T g_trash_stack_height
0000000000000210 T g_trash_stack_peek
00000000000001f0 T g_trash_stack_pop
00000000000001e0 T g_trash_stack_push
                 U IA__g_assert_warning
0000000000000b90 T IA__g_async_queue_length
0000000000000c70 T IA__g_async_queue_length_unlocked
00000000000004c0 T IA__g_async_queue_lock
0000000000000250 T IA__g_async_queue_new
0000000000000830 T IA__g_async_queue_pop
00000000000008e0 T IA__g_async_queue_pop_unlocked
0000000000000650 T IA__g_async_queue_push
00000000000007a0 T IA__g_async_queue_push_sorted
0000000000000720 T IA__g_async_queue_push_sorted_unlocked
00000000000005a0 T IA__g_async_queue_push_unlocked
0000000000000290 T IA__g_async_queue_ref
0000000000000d50 T IA__g_async_queue_sort
0000000000000ce0 T IA__g_async_queue_sort_unlocked
0000000000000a70 T IA__g_async_queue_timed_pop
0000000000000b20 T IA__g_async_queue_timed_pop_unlocked
0000000000000950 T IA__g_async_queue_try_pop
0000000000000a00 T IA__g_async_queue_try_pop_unlocked
0000000000000530 T IA__g_async_queue_unlock
0000000000000360 T IA__g_async_queue_unref
                 U IA__g_atomic_int_add
                 U IA__g_atomic_int_exchange_and_add
                 U IA__g_free
                 U IA__g_malloc
                 U IA__g_queue_free
                 U IA__g_queue_insert_sorted
                 U IA__g_queue_new
                 U IA__g_queue_peek_tail
                 U IA__g_queue_pop_tail
                 U IA__g_queue_push_head
                 U IA__g_queue_sort
                 U IA__g_return_if_fail_warning
0000000000000000 r .LC0
0000000000000007 r .LC1
0000000000000015 r .LC2
000000000000001a r .LC3
0000000000000000 r .LC4
0000000000000020 r .LC5
000000000000003c r .LC6
0000000000000041 r .LC7
000000000000004f r .LC8
0000000000000320 r __PRETTY_FUNCTION__.6544
0000000000000300 r __PRETTY_FUNCTION__.6552
00000000000002e0 r __PRETTY_FUNCTION__.6560
00000000000002c0 r __PRETTY_FUNCTION__.6568
00000000000002a0 r __PRETTY_FUNCTION__.6578
0000000000000280 r __PRETTY_FUNCTION__.6586
0000000000000260 r __PRETTY_FUNCTION__.6595
0000000000000240 r __PRETTY_FUNCTION__.6606
0000000000000210 r __PRETTY_FUNCTION__.6619
00000000000001e0 r __PRETTY_FUNCTION__.6634
0000000000000180 r __PRETTY_FUNCTION__.6649
00000000000001b0 r __PRETTY_FUNCTION__.6656
0000000000000150 r __PRETTY_FUNCTION__.6664
0000000000000130 r __PRETTY_FUNCTION__.6673
0000000000000100 r __PRETTY_FUNCTION__.6681
00000000000000d0 r __PRETTY_FUNCTION__.6691
00000000000000a0 r __PRETTY_FUNCTION__.6700
0000000000000070 r __PRETTY_FUNCTION__.6709
0000000000000040 r __PRETTY_FUNCTION__.6717
0000000000000020 r __PRETTY_FUNCTION__.6727
0000000000000000 r __PRETTY_FUNCTION__.6738
I don't know how to read this output, so I will be very glad for your help.
 
Old 03-20-2022, 03:41 PM   #4
cpeognsoelds
LQ Newbie
 
Registered: Feb 2022
Posts: 11

Original Poster
Rep: Reputation: Disabled
This post is now moot as I have installed python 3.9 in a virtual environment, installed meson and ninja, and this error no longer occurs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
colord-1.4.3 requires glib2-2.5.6 or greater but slackware 14.2 only ships with glib2-2.46.2 nimbusdin Slackware 8 08-19-2018 03:43 PM
strange missing _g_xxx error messages related to glib2 laimis Linux - Software 0 11-15-2004 07:09 AM
Problems installing Glib2 eggoz Linux - Software 0 06-27-2004 06:28 PM
upgrade to glib2.3 wilsnyder Linux - Software 1 07-02-2003 05:07 PM
Cannot find glib after glib2 install spooge Linux - Newbie 0 06-04-2002 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration