[gmp] WIP
Hmm ok that is exactly the same error I observed when trying to update gmp. Seems like something is missing here:
./libtool: eval: line 10827: `dumpbin.exe -symbols -headers .libs/libgmp.la-2.obj | <something is missing here> | /usr/bin/sed -e ...
https://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00000.html
@Neumann-A https://github.com/microsoft/vcpkg/issues/36639
https://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00000.html
This old message probably doesn't help. config.log shows that there is still the output which should enable "MS dumpbin" format, but it doesn't for gmp. (It does for another failed package in CI, that's where I got the expected strings from.)
Found an old build log from the vcpkg-make PR. It shos the missing piece
libtool: link: dumpbin.exe -symbols -headers @.libs\\libgmp.la.nm | gawk ' {last_section=section; section=$ 3}; /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]}; /Section length .*#relocs.*(pick any)/{hide[last_section]=1}; /^ *Symbol name *: /{split($ 0,sn,":"); si=substr(sn[2],2)}; /^ *Type *: code/{print "T",si,substr(si,length(prfx))}; /^ *Type *: data/{print "I",si,substr(si,length(prfx))}; $ 0!~/External *\|/{next}; / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next}; {if(hide[section]) next}; {f="D"}; $ 0~/\(\).*\|/{f="T"}; {split($ 0,a,/\||\r/); split(a[2],s)}; s[1]~/^[@?]/{print f,s[1],s[1]; next}; s[1]~prfx {split(s[1],t,"@"); print f,t[1],substr(t[1],length(prfx))} ' prfx=^ | /usr/bin/sed '/ __gnu_lto/d' | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/' | /usr/bin/sed -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > .libs/gmp.exp
libtool: link: if test DEF = "`/usr/bin/sed -n -e 's/^[ ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' -e q .libs/gmp.exp`" ; then cp ".libs/gmp.exp" ".libs/gmp-10.dll.def"; echo ".libs\\gmp-10.dll.def" > ".libs/gmp-10.dll.exp"; else /usr/bin/sed -e 's/^/-link -EXPORT:/' < .libs/gmp.exp > .libs/gmp-10.dll.exp; fi
It is in configure ... Can you manually reproduce those steps in configure? I don't have MSVC...
I mean: please look for lt_cv_sys_global_symbol_pipe.
generated libtool diff: work vs broke libtool.txt
It somehow identifies it as BSD nm ? I'll try to check MSYS_ROOT next
work vs broke. So configure is not using dumpbin ?
@@ -19109,9 +18738,11 @@ gmp_cv_option_alloca=alloca
gmp_cv_prog_exeext_for_build=.exe
gmp_cv_prog_m4=m4
lt_cv_ar_at_file=@
-lt_cv_deplibs_check_method=pass_all
+lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+lt_cv_file_magic_cmd=func_win32_libid
+lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
-lt_cv_nm_interface='MS dumpbin'
+lt_cv_nm_interface='BSD nm'
lt_cv_objdir=.libs
lt_cv_path_LD='link.exe -verbose'
lt_cv_path_LDCXX=
@@ -19128,11 +18759,11 @@ lt_cv_prog_compiler_static_works_CXX=yes
lt_cv_prog_gnu_ld=no
lt_cv_prog_gnu_ldcxx=
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
-lt_cv_sys_global_symbol_pipe='gawk '\'' {last_section=section; section=$ 3}; /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]}; /Section length .*#relocs.*(pick any)/{hide[last_section]=1}; /^ *Symbol name *: /{split($ 0,sn,":"); si=substr(sn[2],2)}; /^ *Type *: code/{print "T",si,substr(si,length(prfx))}; /^ *Type *: data/{print "I",si,substr(si,length(prfx))}; $ 0!~/External *\|/{next}; / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next}; {if(hide[section]) next}; {f="D"}; $ 0~/\(\).*\|/{f="T"}; {split($ 0,a,/\||\r/); split(a[2],s)}; s[1]~/^[@?]/{print f,s[1],s[1]; next}; s[1]~prfx {split(s[1],t,"@"); print f,t[1],substr(t[1],length(prfx))} '\'' prfx=^ | /usr/bin/sed '\''/ __gnu_lto/d'\'''
-lt_cv_sys_global_symbol_to_c_name_address='/usr/bin/sed -n -e '\''s/^I .* \(.*\)$/ {"\1", (void *) 0},/p'\'' -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\'''
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='/usr/bin/sed -n -e '\''s/^I .* \(lib.*\)$/ {"\1", (void *) 0},/p'\'' -e '\''s/^I .* \(.*\)$/ {"lib\1", (void *) 0},/p'\'' -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\'''
-lt_cv_sys_global_symbol_to_cdecl='/usr/bin/sed -n -e '\''s/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'\'' -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(.*\)$/extern char \1;/p'\'''
-lt_cv_sys_global_symbol_to_import='/usr/bin/sed -n -e '\''s/^I .* \(.*\)$/\1/p'\'''
+lt_cv_sys_global_symbol_pipe=
+lt_cv_sys_global_symbol_to_c_name_address='/usr/bin/sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='/usr/bin/sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGISTW][ABCDGISTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\'''
+lt_cv_sys_global_symbol_to_cdecl=
+lt_cv_sys_global_symbol_to_import=
Configure: Broke:
else case e in #(
e) lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
Working:
else $as_nop
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
looks like a typo in how configure gets generated.
Maybe some change in autoconf2.72 vs. autoconf2.71?
Here is the diff autoconf-diff.txt There are changes like:
-[m4_append_uniq([_AS_CLEANUP], [AS_REQUIRE([_AS_EMPTY_ELSE_PREPARE])])]dnl
-[else $as_nop
- $1
+[else case e in @%:@(
+ e) $1 ;;
+esac
in there but I couldn't pin that to an upstream commit yet
BTW upstream discourages running autoreconf, https://gmplib.org/devel/repo-usage
BTW upstream discourages running autoreconf Do not use autoreconf; it will overwrite config.guess which in turn will cause any builds to be awful.
They are just claiming that their config.guess is better than upstreams config.guess. That might be or might not be the case. But the problem here is unrelated to gmp. Shouldn't all make based builds which build dynamic libs currently fail due to the wrong detection?
So I assume the MSYS update also broke xcb-util-errors but I already have a fix for that in the meson pr
And should CI have failed before the merge? Again, the config.log shows that the checks for MS dumpbin format are run, it shows the MS dumpbin output, the output shows a string
009 00000000 SECT3 notype External | some_variable
which should match the expected pattern in
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
fi
so this where something goes wrong when we leave with
configure:12427: result: BSD nm
A wait. You know what the problem in xcb-util-errors was?
It is $(AM_V_GEN)$(PYTHON) $(srcdir)/src/extensions.py [email protected] ${XCBPROTO_XCBINCLUDEDIR}/*.xml && \ where * got directly expanded into one of the filenames in that folder instead of correctly being passed on. Maybe the same is happening here that in if $GREP 'External.*some_variable' conftest.out > /dev/null the * gets expanded to nothing instead of being passed on as a regex character.
So strange observation: The tree which failed previously worked miraculously and was broken again by re-running the bootstrap script. Couldn't get it to work again. cc @BillyONeal
Maybe relevant: https://stackoverflow.com/questions/11456403/stop-shell-wildcard-character-expansion
ok seems like I did a git pull in-between which of course breaks it. (I have too many vcpkg folders o.O)