| View previous topic :: View next topic |
| Author |
Message |
segfault00 n00b


Joined: 16 Oct 2013 Posts: 4 Location: Ottawa, Canada
|
Posted: Tue Nov 05, 2013 3:56 pm Post subject: [SOLVED] i686 gptfdisk error with USE='static static-libs' |
|
|
I added 'static static-libs' to my USE line in make.conf and then ran 'emerge gptfdisk', but it errors out on the final stage as follows:
| Code: |
emerge gptfdisk
* IMPORTANT: 3 config files in '/etc/portage' need updating.
* See the CONFIGURATION FILES section of the emerge
* man page to learn how to update config files.
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-apps/gptfdisk-0.8.6
* gptfdisk-0.8.6.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking gptfdisk-0.8.6.tar.gz to /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work
>>> Source unpacked in /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work
>>> Preparing source in /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6 ...
make
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o crc32.o crc32.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o support.o support.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o guid.o guid.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o gptpart.o gptpart.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o mbrpart.o mbrpart.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o basicmbr.o basicmbr.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o mbr.o mbr.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o gpt.o gpt.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o bsd.o bsd.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o parttypes.o parttypes.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o attributes.o attributes.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o diskio.o diskio.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o diskio-unix.o diskio-unix.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o cgdisk.o cgdisk.cc
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -c -o gptcurses.o gptcurses.cc
i686-pc-linux-gnu-g++ crc32.o support.o guid.o gptpart.o mbrpart.o basicmbr.o mbr.o gpt.o bsd.o parttypes.o attributes.o diskio.o diskio-unix.o cgdisk.o gptcurses.o -Wl,-O1 -Wl,--as-needed -static -licuio -licuuc -luuid -lncurses -o cgdisk
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0xd1): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_free_exception':
(.text.__cxa_free_exception+0x6b): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_free_exception':
(.text.__cxa_free_exception+0x86): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':
(.text.__cxa_allocate_dependent_exception+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':
(.text.__cxa_allocate_dependent_exception+0xcc): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':
(.text.__cxa_free_dependent_exception+0x72): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':
(.text.__cxa_free_dependent_exception+0x8d): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(putil.ao): In function `uprv_dl_open':
(.text+0x16d0): undefined reference to `dlopen'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(putil.ao): In function `uprv_dlsym_func':
(.text+0x1730): undefined reference to `dlsym'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(putil.ao): In function `uprv_dl_close':
(.text+0x1701): undefined reference to `dlclose'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(umutex.ao): In function `umtx_lock':
(.text+0x184): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(umutex.ao): In function `umtx_unlock':
(.text+0xf8): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(udata.ao): In function `openCommonData(char const*, int, UErrorCode*)':
(.text+0x964): undefined reference to `icudt51_dat'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(udata.ao): In function `openCommonData(char const*, int, UErrorCode*)':
(.text+0x97a): undefined reference to `icudt51_dat'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../lib/libicuuc.a(udata.ao): In function `openCommonData(char const*, int, UErrorCode*)':
(.text+0x99e): undefined reference to `icudt51_dat'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x56): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x6c): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0x40): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0xbc): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0x176): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x43): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x7b): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x175): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
(.text+0x1768): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
(.text+0x177f): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases':
(.text+0x188e): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases':
(.text+0x18a5): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
(.text+0x196d): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
(.text+0x19df): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
(.text+0x1aaa): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
(.text+0x1af9): undefined reference to `pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
make: *** [cgdisk] Error 1
* ERROR: sys-apps/gptfdisk-0.8.6::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-apps/gptfdisk-0.8.6::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-apps/gptfdisk-0.8.6::gentoo'`.
* The complete build log is located at '/var/tmp/portage/sys-apps/gptfdisk-0.8.6/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-apps/gptfdisk-0.8.6/temp/environment'.
* Working directory: '/var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6'
* S: '/var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6'
|
I noticed the libstdc++ doing the complaining so tried reinstalling that (emerge libstdc++) in case it needed to be reinstalled as a static lib as well. No luck there.
Any ideas why 'pthread_mutex_unlock' is not defined?
I am fairly new to Gentoo, is there something silly I've overlooked?
Thanks for any help.
Last edited by segfault00 on Tue Nov 05, 2013 6:51 pm; edited 2 times in total |
|
| Back to top |
|
 |
segfault00 n00b


Joined: 16 Oct 2013 Posts: 4 Location: Ottawa, Canada
|
Posted: Tue Nov 05, 2013 5:38 pm Post subject: |
|
|
By digging into the working directory of this build and adding "-lpthread" as a build flag it seems to build. But how to fit this into the portage/emerge system to take my change locally?
....more reading to do I guess. |
|
| Back to top |
|
 |
segfault00 n00b


Joined: 16 Oct 2013 Posts: 4 Location: Ottawa, Canada
|
Posted: Tue Nov 05, 2013 6:48 pm Post subject: [solved] |
|
|
Alrighty then, I finally got it to build. It seems the Makefile was missing some good old "-lpthread" switches in the build line. Once this was added more errors were revealed so I ended up patching the file as seen below in /var/tmp/portage/sys-apps/gptfdisk-0.8.6/work/gptfdisk-0.8.6/Makefile and then running it by hand (since emerge was nice enough to successfully install all the needed static libraries and was only failing on the final package).
| Code: |
--- Makefile-orig 2013-11-05 13:32:38.000000000 -0500
+++ Makefile 2013-11-05 13:31:30.000000000 -0500
@@ -15,15 +15,15 @@
gdisk: $(LIB_OBJS) gdisk.o gpttext.o
# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -lpthread -ldl -licudata -static -o gdisk
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -lpthread -ldl -licudata -static -o cgdisk
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -lpthread -ldl -licudata -static -o sgdisk
fixparts: $(MBR_LIB_OBJS) fixparts.o
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
|
I do not know why these additions were needed to build and am currently assuming that it is simply a broken ebuild for my specific build/system (I'm running an i686 ach and was compiling gptfdisk statically).
It is VERY possible that I have something wrong in a configuration file somewhere and caused this error myself, though this is a fairly clean newish install. Either way, the above changes fix my problem. And if this helps other folks then maybe a gentoo patch can be made.
EDIT:
see Bug 490582 |
|
| Back to top |
|
 |
|
|
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
|
|