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'