Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598336 - dev-libs/libltdl-2.4.6 fails to configure/install using llvm-3.5.2
Summary: dev-libs/libltdl-2.4.6 fails to configure/install using llvm-3.5.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: AMD64 Other
: Normal blocker (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-28 10:50 UTC by Vladimir Smirnov (RETIRED)
Modified: 2016-12-18 10:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libltdl.log (libltdl.log,11.22 KB, text/plain)
2016-10-28 10:50 UTC, Vladimir Smirnov (RETIRED)
Details
binutils-apple.log.gz (bintutils-apple.log.gz,14.37 KB, application/x-gzip)
2016-10-28 10:51 UTC, Vladimir Smirnov (RETIRED)
Details
stage3.log.gz (stage3.log.gz,523.52 KB, application/x-gzip)
2016-10-28 10:54 UTC, Vladimir Smirnov (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Smirnov (RETIRED) gentoo-dev 2016-10-28 10:50:11 UTC
I've tried to install gentoo-prefix on MacOS X 10.11.6 (AMD64) and it failed with the following error message:

  CCLD     libltdl.la
libtool:   error: not configured to extract global symbols from dlpreopened files
Undefined symbols for architecture x86_64:
  "_lt_libltdl_LTX_preloaded_symbols", referenced from:
      _lt_dlinit in libltdl_la-ltdl.o
ld: symbol(s) not found for architecture x86_64

See full build log for it in attachments.

Reproducible: Always

Steps to Reproduce:
1. Try to bootstrap prefix on macos x.
Actual Results:  
libltdl will fail during stage3.

Expected Results:  
should work :)

I've managed to work this around by adding:
emerge_pkgs --nodeps autoconf =automake-1.13* libtool || return 1


to bootstrap-prefix.sh just before emerging packages in stage3 and disabeling shebang checking (at that stage there is no perl, and prefixed perl, which is required for some autoconf scripts (haven't checked if I can work this around with use flags).
Comment 1 Vladimir Smirnov (RETIRED) gentoo-dev 2016-10-28 10:50:38 UTC
Created attachment 451734 [details]
libltdl.log
Comment 2 Vladimir Smirnov (RETIRED) gentoo-dev 2016-10-28 10:51:28 UTC
Created attachment 451736 [details]
binutils-apple.log.gz
Comment 3 Vladimir Smirnov (RETIRED) gentoo-dev 2016-10-28 10:54:55 UTC
Created attachment 451738 [details]
stage3.log.gz

Full stage3 build log.
Comment 4 Fabian Groffen gentoo-dev 2016-10-28 11:00:06 UTC
Thanks, I've been looking for this for a while, explains a lot!
Comment 5 Fabian Groffen gentoo-dev 2016-10-28 11:07:40 UTC
will look into bootstrap of libtool pre-portage to work around any checks.
Comment 6 Vladimir Smirnov (RETIRED) gentoo-dev 2016-10-28 12:52:16 UTC
Well, I've encountered more problems after that. So it might not be the complete solution though. Will try to create a complete list of problems.
Comment 7 Emre Eryilmaz 2016-11-01 12:13:26 UTC
same error for me. I've been asking the same question in #gentoo-prefix. so paste logs for irc. 
emerge --info : http://pastebin.com/eGtGp5fz
libltdl build log: http://pastebin.com/pPbmnCND

I guess there is a problem "ld". because ld command output:

ld -v
ld: BINUTILS_CONFIG_LD not found in environment
ld: linker not found in PATH
ld: invoking /Users/vader/gentoo/usr/x86_64-apple-darwin16/binutils-bin/7.3.1/ld with arguments:
  ld
  -search_paths_first
  -v
  -L/Users/vader/gentoo/usr/lib
  -L/Users/vader/gentoo/lib
@(#)PROGRAM:ld  PROJECT:ld64-264.3.102 (Gentoo binutils-apple-7.3.1)
configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)
Library search paths:
	/Users/vader/gentoo/usr/lib
	/Users/vader/gentoo/lib
	/usr/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/
ld: warning: -arch not specified
ld: warning: -macosx_version_min not specified, assuming 10.12
ld: no object files specified for inferred architecture x86_64
Comment 8 Emre Eryilmaz 2016-11-08 09:44:15 UTC
I solved this bug.

--- a/dev-libs/libltdl/libltdl-2.4.6.ebuild	2016-11-08 12:40:21.000000000 +0300
+++ b/dev-libs/libltdl/libltdl-2.4.6.ebuild	2016-11-08 12:40:01.000000000 +0300
@@ -32,6 +32,7 @@
 	ECONF_SOURCE=${S} \
 	econf \
 		--enable-ltdl-install \
+		--enable-shared=no
 		$(use_enable static-libs static)
 }
Comment 9 Fabian Groffen gentoo-dev 2016-11-08 09:48:29 UTC
Thanks!  Does this allow you to bootstrap successfully?
Comment 10 Emre Eryilmaz 2016-11-08 16:27:44 UTC
hi fabian, bootstrap not finish. 

openssl-1.0.2g -> 404 error (temporary,i downloaded in distfiles) But this package flagged by security advisories )

This packages gives ssl error when packages fetching:
Python-3.5.1.tar.xz
python-gentoo-patches-3.5.1-0.tar.xz
python-prefix-3.5.1-gentoo-patches-r2.tar.xz
python-prefix-3.4.3-gentoo-patches-r1.tar.xz
Python-2.7.11.tar.xz
python-prefix-2.7.11-gentoo-patches-r1.tar.xz


DBMC's corrections for ssl error on #gentoo-prefix:

FETCHCOMMAND="/usr/local/bin/wget --no-check-certificate \${URI} -P \${DISTDIR}"
RESUMECOMMAND="/usr/local/bin/wget -c --no-check-certificate \${URI} -P \${DISTDIR}"
Comment 11 Xi 2016-11-28 02:45:54 UTC
Thanks Emre, that trick did fix the problem.

I also got SSL error while downloading those Python packages. But if I download them directly from terminal or web browser, it works find. I think the bootstrapping script is using a curl that is inside the temporary prefix environment which does not have SSL set correctly.
Comment 12 Emre Eryilmaz 2016-11-29 11:19:08 UTC
Hi Xi,

can see https://bugs.gentoo.org/show_bug.cgi?id=598336#c10

=> 

FETCHCOMMAND="/usr/local/bin/wget --no-check-certificate \${URI} -P \${DISTDIR}"
RESUMECOMMAND="/usr/local/bin/wget -c --no-check-certificate \${URI} -P \${DISTDIR}"
Comment 13 gentoo.tlm 2016-11-30 13:34:22 UTC
Hi,

first of all, this Bug tracker helped me a lot, Thx to you all.

With the last Step mentioned by Emre i do have no clue where to put it in.
The link refers to this Bug again
Comment 14 gentoo.tlm 2016-11-30 13:38:13 UTC
Sorry for multipost, if forgot to mention that just executing it doesn’t fixed the Problem for me
Comment 15 tdr 2016-12-02 13:03:23 UTC
Patch from Comment 8 worked to get passed that.  Several patches did not apply, but those built.  Stage3 log was missing but here is output:


 * Messages for package dev-libs/popt-1.16-r02.1:
 *   Darwin patch set 'darwin-conf' failed to apply!

 * Messages for package dev-libs/expat-2.1.0-r4:
 *   Darwin patch set 'darwin-conf' failed to apply!

 * Messages for package dev-libs/libxml2-2.9.4:
 *   Darwin patch set 'darwin-conf' failed to apply!

 * Messages for package dev-libs/iniparser-3.1-r1:
 *   Darwin patch set 'darwin-conf' failed to apply!

 * Messages for package sys-devel/gettext-0.19.7:
 *   Darwin patch set 'darwin-conf' failed to apply!
 *   Darwin patch set 'darwin-conf' failed to apply!

 * Messages for package dev-lang/python-3.5.1-r3:
 * Fetch failed for 'dev-lang/python-3.5.1-r3', Log file:
    ^^ found the python tarballs so will run stage3 again to see how far it goes.
Comment 16 Morladim 2016-12-13 09:37:07 UTC
(In reply to Emre Eryilmaz from comment #8)
> I solved this bug.
> 
> --- a/dev-libs/libltdl/libltdl-2.4.6.ebuild	2016-11-08 12:40:21.000000000
> +0300
> +++ b/dev-libs/libltdl/libltdl-2.4.6.ebuild	2016-11-08 12:40:01.000000000
> +0300
> @@ -32,6 +32,7 @@
>  	ECONF_SOURCE=${S} \
>  	econf \
>  		--enable-ltdl-install \
> +		--enable-shared=no
>  		$(use_enable static-libs static)
>  }

Thanks!  Does this allow work with bootstrap successfully?
Comment 17 Fabian Groffen gentoo-dev 2016-12-15 18:37:26 UTC
The problem/difference is llvm-3.5.2 returning undefined instead of common symbol.

[nut:work/libtool-2.4.6/libltdl] % nm --version
LLVM (http://llvm.org/):
  LLVM version 3.8.1
  Optimized build.
  Default target: x86_64-apple-darwin16.3.0
  Host CPU: sandybridge
[nut:work/libtool-2.4.6/libltdl] % nm -B x.o
0000000000000010 T _main
0000000000000000 T _nm_test_func
0000000000000001 C _nm_test_var

[nut:work/libtool-2.4.6/libltdl] % /Volumes/Scratch/Gentoo/bootstrap32-20161215/usr/bin/x86_64-apple-darwin16-nm --version
LLVM (http://llvm.org/):
  LLVM version 3.5.2
  Optimized build.
  Default target: x86_64-apple-darwin16.3.0
  Host CPU: corei7-avx
[nut:work/libtool-2.4.6/libltdl] % /Volumes/Scratch/Gentoo/bootstrap32-20161215/usr/bin/x86_64-apple-darwin16-nm -B x.o 
0000000000000010 T _main
0000000000000000 T _nm_test_func
0000000000000001 U _nm_test_var


U is not in the character list libtool is looking for.
Comment 18 Fabian Groffen gentoo-dev 2016-12-18 10:03:17 UTC
Fixed in the latest bootstrap-prefix.sh script.