Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to build under gcc10 version 10-20200405 but successfully builds with gcc9.3.0 #5219

Closed
hydra3333 opened this issue Apr 12, 2020 · 13 comments
Closed
Labels

Comments

@hydra3333
Copy link

@hydra3333 hydra3333 commented Apr 12, 2020

Hello.

As of yestersday, I tried to cross-compile curl library under ubuntu 18.04.3 mingw64 for win10x64 for use with cross-compiling mediainfo.

The last commit (release) that built successfully under gcc10 version 10-20200405 was :
commit works: '2cfac302fbeec68f1727cba3d1705e16f02220ad'

This subsequent commit (release) fails to build under gcc10 gcc10 version 10-20200405 but successfully builds with gcc9.3.0
commit fails: 'b8d1366852fd0034374c5de1e4968c7a224f77cc'

Cheers

@jay jay added the build label Apr 12, 2020
@jay
Copy link
Member

@jay jay commented Apr 12, 2020

What was the error? Can you bisect it?

@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

ok, it'll take me a few hours to resurrect the deleted vm and try

@jay
Copy link
Member

@jay jay commented Apr 12, 2020

If it's going to take a lot of your time don't worry about it we can just wait until someone else reports it and has that data.

@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

i'm retired and in lockdown, i've time ;)

@hydra3333 hydra3333 changed the title fails to build under gcc10 gcc10 version 10-20200405 but successfully builds with gcc9.3.0 fails to build under gcc10 version 10-20200405 but successfully builds with gcc9.3.0 Apr 12, 2020
@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

OK, when it fails with gcc10 version 10-20200405 at latest commit (but works with gcc 9.3.0), this is what I see:

make[2]: Entering directory '/home/u/Desktop/_working/workdir/x86_64/curl_git/src'
  CC       curl-slist_wc.o
  CC       curl-tool_binmode.o
  CC       curl-tool_bname.o
  CC       curl-tool_cb_dbg.o
  CC       curl-tool_cb_hdr.o
  CC       curl-tool_cb_prg.o
  CC       curl-tool_cb_rea.o
  CC       curl-tool_cb_see.o
  CC       curl-tool_cb_wrt.o
  CC       curl-tool_cfgable.o
  CC       curl-tool_convert.o
  CC       curl-tool_dirhie.o
  CC       curl-tool_doswin.o
  CC       curl-tool_easysrc.o
  CC       curl-tool_filetime.o
  CC       curl-tool_formparse.o
  CC       curl-tool_getparam.o
  CC       curl-tool_getpass.o
  CC       curl-tool_help.o
  CC       curl-tool_helpers.o
  CC       curl-tool_homedir.o
  HUGE     tool_hugehelp.c
  CC       curl-tool_libinfo.o
  CC       curl-tool_main.o
  CC       curl-tool_metalink.o
  CC       curl-tool_msgs.o
  CC       curl-tool_operate.o
  CC       curl-tool_operhlp.o
  CC       curl-tool_panykey.o
  CC       curl-tool_paramhlp.o
  CC       curl-tool_parsecfg.o
  CC       curl-tool_progress.o
  CC       curl-tool_strdup.o
  CC       curl-tool_setopt.o
  CC       curl-tool_sleep.o
  CC       curl-tool_urlglob.o
  CC       curl-tool_util.o
  CC       curl-tool_vms.o
  CC       curl-tool_writeout.o
  CC       curl-tool_writeout_json.o
  CC       curl-tool_xattr.o
  CC       curl-tool_hugehelp.o
  CC       ../lib/curl-strtoofft.o
  CC       ../lib/curl-nonblock.o
  CC       ../lib/curl-warnless.o
  CC       ../lib/curl-curl_ctype.o
  CCLD     curl.exe
/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/10.0.1/../../../../x86_64-w64-mingw32/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-system_win32.o):system_win32.c:(.bss+0x10): multiple definition of `Curl_freq'; curl-tool_doswin.o:tool_doswin.c:(.bss+0x8): first defined here
/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/10.0.1/../../../../x86_64-w64-mingw32/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-system_win32.o):system_win32.c:(.bss+0x8): multiple definition of `Curl_isVistaOrGreater'; curl-tool_doswin.o:tool_doswin.c:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
Makefile:879: recipe for target 'curl.exe' failed
make[2]: *** [curl.exe] Error 1
make[2]: Leaving directory '/home/u/Desktop/_working/workdir/x86_64/curl_git/src'
Makefile:1964: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/u/Desktop/_working/workdir/x86_64/curl_git/src'
Makefile:983: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

for configure:

{
	'repo_type' : 'git',
	'url' : 'https://github.com/curl/curl',
	'depth_git' : 0,
	#'branch' : '2cfac302fbeec68f1727cba3d1705e16f02220ad', # works: '2cfac302fbeec68f1727cba3d1705e16f02220ad', # fails: 'b8d1366852fd0034374c5de1e4968c7a224f77cc' under gcc10,
	'rename_folder' : 'curl_git',
	'configure_options': '--enable-static --disable-shared --target={bit_name2}-{bit_name_win}-gcc --host={target_host} --build=x86_64-linux-gnu --with-libssh2 --with-gnutls --with-ca-fallback --without-winssl --prefix={target_prefix} --exec-prefix={target_prefix}', # 2019.12.13
	'depends_on': (
		'zlib', 'gnutls', 'libssh2',
	),
	'_info' : { 'version' : 'git (master)', 'fancy_name' : 'libcurl' },
}

Now, onto bisecting.

@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

Oh, with commit 2cfac302fbeec68f1727cba3d1705e16f02220ad this is what I see

 CC       curl-tool_util.o
  CC       curl-tool_vms.o
  CC       curl-tool_writeout.o
  CC       curl-tool_xattr.o
  CC       curl-tool_hugehelp.o
  CC       ../lib/curl-strtoofft.o
  CC       ../lib/curl-nonblock.o
  CC       ../lib/curl-warnless.o
  CC       ../lib/curl-curl_ctype.o
  CC       ../lib/curl-curl_ctype.o
  CCLD     curl.exe
make[2]: Leaving directory '/home/u/Desktop/_working/workdir/x86_64/curl_git/src'
make[1]: Leaving directory '/home/u/Desktop/_working/workdir/x86_64/curl_git/src'
make[1]: Entering directory '/home/u/Desktop/_working/workdir/x86_64/curl_git'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/u/Desktop/_working/workdir/x86_64/curl_git'
@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

OK...

Commit 1fc0617 tool_util: Improve Windows version of tvnow() Feb 19, 2020 fails to build under gcc10 version 10-20200405

The prior commit 3735107d62ad28d6e25bd94109ab9f2454c22116 builds OK under gcc10 version 10-20200405

@jay
Copy link
Member

@jay jay commented Apr 12, 2020

Ok. Are you able to build this:

cat << EOF > shared2.h
extern unsigned int foo(unsigned int a);
EOF

cat << EOF > shared2.c
#include "shared2.h"
unsigned int foo(unsigned int a) { return a + 5; }
EOF

cat << EOF > shared.h
extern unsigned int bar(unsigned int a);
EOF

cat << EOF > shared.c
#include "shared.h"
#include "shared2.h"
unsigned int bar(unsigned int a) { return foo(a); }
EOF

cat << EOF > program.c
#include <stdio.h>
#include "shared.h"
unsigned int foo(unsigned int a) { return a + 99; }
int main(void)
{
  int result = foo(1);
  printf("%d\n", result);
  result = bar(1);
  printf("%d\n", result);
  return 0;
}
EOF

x86_64-w64-mingw32-gcc -c -o shared.o shared.c
x86_64-w64-mingw32-gcc -c -o shared2.o shared2.c
x86_64-w64-mingw32-ar rcs libshared.a shared.o shared2.o
x86_64-w64-mingw32-gcc -Wall  -L. program.c -o program.exe -lshared
./program.exe

The output should be:

100
100
@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

OK will do.
It's cross-compiling, so program.exe runs on win10 of course.

@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

OK,

~/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc -c -o shared.o shared.c
~/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc -c -o shared2.o shared2.c
~/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar rcs libshared.a shared.o shared2.o
~/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc -Wall  -L. program.c -o program.exe -lshared
D:\VM>program.exe
100
100
D:\VM>
@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 12, 2020

uncut console log, probably of less than zero use to you.

./cross_compiler_v100_001.py --force --debug -d test_only
[17:54:12][INFO] Loaded 173 packages
[17:54:12][DEBUG] Debugging is on
[17:54:12][INFO] Starting custom build process for: test_only
[17:54:12][INFO] Starting build script
Changing dir from /home/u/Desktop/_working to /home/u/Desktop/_working/workdir
[17:54:12][DEBUG] cd /home/u/Desktop/_working/workdir
[17:54:12][INFO] MinGW-w64 install is working! (target mingw64)
[17:54:12][INFO] Building dependency 'test_only'
[17:54:12][DEBUG] Reset CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS to: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
##############################
### Environment variables:  ###
	CLUTTER_IM_MODULE : xim
	LC_ALL : en_AU.UTF-8
	LS_COLORS : rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
	LESSCLOSE : /bin/lesspipe %s %s
	XDG_MENU_PREFIX : gnome-
	LANG : en_AU.UTF-8
	DISPLAY : :10.0
	GNOME_SHELL_SESSION_MODE : ubuntu
	COLORTERM : truecolor
	SSH_AUTH_SOCK : /home/u/.cache/keyring-9WC1I0/ssh
	XRDP_SOCKET_PATH : /var/run/xrdp/sockdir
	USER : u
	QT4_IM_MODULE : xim
	TEXTDOMAINDIR : /usr/share/locale/
	GNOME_TERMINAL_SCREEN : /org/gnome/Terminal/screen/ae04484d_5c03_4ec1_bba7_84e19133cac9
	PULSE_SCRIPT : /etc/xrdp/pulse/default.pa
	PWD : /home/u/Desktop/_working
	HOME : /home/u
	UID : 1000
	TEXTDOMAIN : im-config
	SSH_AGENT_PID : 1039
	QT_ACCESSIBILITY : 1
	XDG_DATA_DIRS : /usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
	GJS_DEBUG_OUTPUT : stderr
	GTK_MODULES : gail:atk-bridge
	TERM : xterm-256color
	SHELL : /bin/bash
	VTE_VERSION : 5202
	GNOME_KEYRING_CONTROL : /home/u/.cache/keyring-9WC1I0
	QT_IM_MODULE : xim
	XMODIFIERS : @im=ibus
	IM_CONFIG_PHASE : 2
	XDG_CURRENT_DESKTOP : ubuntu:GNOME
	GPG_AGENT_INFO : /run/user/1000/gnupg/S.gpg-agent:0:1
	GNOME_TERMINAL_SERVICE : :1.70
	SHLVL : 1
	LANGUAGE : en_AU:en
	GNOME_DESKTOP_SESSION_ID : this-is-deprecated
	LOGNAME : u
	DBUS_SESSION_BUS_ADDRESS : unix:abstract=/tmp/dbus-Emd8vnA35S,guid=6108405751ecfe07bd1870b25e92c353
	PATH : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin:/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
	GJS_DEBUG_TOPICS : JS ERROR;JS LOG
	SESSION_MANAGER : local/u18:@/tmp/.ICE-unix/949,unix/u18:/tmp/.ICE-unix/949
	XRDP_SESSION : 1
	LESSOPEN : | /bin/lesspipe %s
	GTK_IM_MODULE : ibus
	OLDPWD : /home/u/Desktop
	_ : ./cross_compiler_v100_001.py
	PKG_CONFIG_PATH : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig
	PKG_CONFIG_LIBDIR : 
	COLOR : ON
	CLICOLOR_FORCE : ON
	CFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	CXXFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	CPPFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	LDFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
##############################
##############################
Changing dir from /home/u/Desktop/_working/workdir to /home/u/Desktop/_working/workdir/x86_64
[17:54:12][DEBUG] cd /home/u/Desktop/_working/workdir/x86_64
Changing dir from /home/u/Desktop/_working/workdir/x86_64 to TEST_ONLY_git
[17:54:12][DEBUG] cd TEST_ONLY_git
[17:54:12][DEBUG] git remote update
[17:54:12][DEBUG] Running 'git remote update' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
Fetching origin
[17:54:13][DEBUG] git checkout -f
[17:54:13][DEBUG] Running 'git checkout -f' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
Your branch is up to date with 'origin/master'.
[17:54:13][DEBUG] git checkout master
[17:54:13][DEBUG] Running 'git checkout master' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
Already on 'master'
Your branch is up to date with 'origin/master'.
[17:54:13][DEBUG] ####################
[17:54:13][DEBUG] Up to date
[17:54:13][DEBUG] LOCAL:  3f7f200e6c8c164b7e2df0fde9b76c7fff726818

[17:54:13][DEBUG] REMOTE: 3f7f200e6c8c164b7e2df0fde9b76c7fff726818

[17:54:13][DEBUG] BASE:   3f7f200e6c8c164b7e2df0fde9b76c7fff726818

[17:54:13][DEBUG] ####################
Changing dir from /home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git to ..
[17:54:13][DEBUG] cd ..
Changing dir from /home/u/Desktop/_working/workdir/x86_64 to TEST_ONLY_git
[17:54:13][DEBUG] cd TEST_ONLY_git
[17:54:13][DEBUG] git clean -ffdx
[17:54:13][DEBUG] Running 'git clean -ffdx' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
Removing libshared.a
Removing program.exe
Removing shared.o
Removing shared2.o
[17:54:13][DEBUG] git submodule foreach --recursive git clean -ffdx
[17:54:13][DEBUG] Running 'git submodule foreach --recursive git clean -ffdx' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][DEBUG] git reset --hard
[17:54:13][DEBUG] Running 'git reset --hard' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
HEAD is now at 3f7f200 program.c
[17:54:13][DEBUG] git submodule foreach --recursive git reset --hard
[17:54:13][DEBUG] Running 'git submodule foreach --recursive git reset --hard' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][DEBUG] git submodule update --init --recursive
[17:54:13][DEBUG] Running 'git submodule update --init --recursive' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'echo "#x86_64-win64-gcc"'
[17:54:13][DEBUG] Running 'echo "#x86_64-win64-gcc"' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
#x86_64-win64-gcc
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'echo "#x86_64-w64-mingw32-"'
[17:54:13][DEBUG] Running 'echo "#x86_64-w64-mingw32-"' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
#x86_64-w64-mingw32-
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'echo "#x86_64-w64-mingw32-gcc"'
[17:54:13][DEBUG] Running 'echo "#x86_64-w64-mingw32-gcc"' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
#x86_64-w64-mingw32-gcc
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'echo "#x86_64-w64-mingw32-ar"'
[17:54:13][DEBUG] Running 'echo "#x86_64-w64-mingw32-ar"' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
#x86_64-w64-mingw32-ar
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'rm -vf shared.o'
[17:54:13][DEBUG] Running 'rm -vf shared.o' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'rm -vf shared2.o'
[17:54:13][DEBUG] Running 'rm -vf shared2.o' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'rm -vf libshared.a'
[17:54:13][DEBUG] Running 'rm -vf libshared.a' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'rm -vf program.exe'
[17:54:13][DEBUG] Running 'rm -vf program.exe' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'x86_64-w64-mingw32-gcc -c -o shared.o shared.c'
[17:54:13][DEBUG] Running 'x86_64-w64-mingw32-gcc -c -o shared.o shared.c' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'x86_64-w64-mingw32-gcc -c -o shared2.o shared2.c'
[17:54:13][DEBUG] Running 'x86_64-w64-mingw32-gcc -c -o shared2.o shared2.c' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'x86_64-w64-mingw32-ar rcs libshared.a shared.o shared2.o'
[17:54:13][DEBUG] Running 'x86_64-w64-mingw32-ar rcs libshared.a shared.o shared2.o' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'x86_64-w64-mingw32-gcc -Wall  -L. program.c -o program.exe -lshared'
[17:54:13][DEBUG] Running 'x86_64-w64-mingw32-gcc -Wall  -L. program.c -o program.exe -lshared' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
[17:54:13][INFO] Runningrun_post_regexreplace-command: 'ls -al'
[17:54:13][DEBUG] Running 'ls -al' in '/home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git'
total 96
drwxrwxr-x 3 u u  4096 Apr 12 17:54 .
drwxrwxrwx 4 u u  4096 Apr 12 17:41 ..
drwxrwxr-x 8 u u  4096 Apr 12 17:54 .git
-rw-rw-r-- 1 u u  1632 Apr 12 17:54 libshared.a
-rw-rw-r-- 1 u u   216 Apr 12 17:41 program.c
-rwxrwxr-x 1 u u 52161 Apr 12 17:54 program.exe
-rw-rw-r-- 1 u u    72 Apr 12 17:41 shared2.c
-rw-rw-r-- 1 u u    41 Apr 12 17:41 shared2.h
-rw-rw-r-- 1 u u   688 Apr 12 17:54 shared2.o
-rw-rw-r-- 1 u u    93 Apr 12 17:41 shared.c
-rw-rw-r-- 1 u u    41 Apr 12 17:41 shared.h
-rw-rw-r-- 1 u u   736 Apr 12 17:54 shared.o
Changing dir from /home/u/Desktop/_working/workdir/x86_64/TEST_ONLY_git to ..
[17:54:13][DEBUG] cd ..
[17:54:13][INFO] Building dependency 'test_only': Done!
[17:54:13][DEBUG] Reset CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS to: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
##############################
### Environment variables:  ###
	CLUTTER_IM_MODULE : xim
	LC_ALL : en_AU.UTF-8
	LS_COLORS : rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
	LESSCLOSE : /bin/lesspipe %s %s
	XDG_MENU_PREFIX : gnome-
	LANG : en_AU.UTF-8
	DISPLAY : :10.0
	GNOME_SHELL_SESSION_MODE : ubuntu
	COLORTERM : truecolor
	SSH_AUTH_SOCK : /home/u/.cache/keyring-9WC1I0/ssh
	XRDP_SOCKET_PATH : /var/run/xrdp/sockdir
	USER : u
	QT4_IM_MODULE : xim
	TEXTDOMAINDIR : /usr/share/locale/
	GNOME_TERMINAL_SCREEN : /org/gnome/Terminal/screen/ae04484d_5c03_4ec1_bba7_84e19133cac9
	PULSE_SCRIPT : /etc/xrdp/pulse/default.pa
	PWD : /home/u/Desktop/_working
	HOME : /home/u
	UID : 1000
	TEXTDOMAIN : im-config
	SSH_AGENT_PID : 1039
	QT_ACCESSIBILITY : 1
	XDG_DATA_DIRS : /usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
	GJS_DEBUG_OUTPUT : stderr
	GTK_MODULES : gail:atk-bridge
	TERM : xterm-256color
	SHELL : /bin/bash
	VTE_VERSION : 5202
	GNOME_KEYRING_CONTROL : /home/u/.cache/keyring-9WC1I0
	QT_IM_MODULE : xim
	XMODIFIERS : @im=ibus
	IM_CONFIG_PHASE : 2
	XDG_CURRENT_DESKTOP : ubuntu:GNOME
	GPG_AGENT_INFO : /run/user/1000/gnupg/S.gpg-agent:0:1
	GNOME_TERMINAL_SERVICE : :1.70
	SHLVL : 1
	LANGUAGE : en_AU:en
	GNOME_DESKTOP_SESSION_ID : this-is-deprecated
	LOGNAME : u
	DBUS_SESSION_BUS_ADDRESS : unix:abstract=/tmp/dbus-Emd8vnA35S,guid=6108405751ecfe07bd1870b25e92c353
	PATH : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin:/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
	GJS_DEBUG_TOPICS : JS ERROR;JS LOG
	SESSION_MANAGER : local/u18:@/tmp/.ICE-unix/949,unix/u18:/tmp/.ICE-unix/949
	XRDP_SESSION : 1
	LESSOPEN : | /bin/lesspipe %s
	GTK_IM_MODULE : ibus
	OLDPWD : /home/u/Desktop
	_ : ./cross_compiler_v100_001.py
	PKG_CONFIG_PATH : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig
	PKG_CONFIG_LIBDIR : 
	COLOR : ON
	CLICOLOR_FORCE : ON
	CFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	CXXFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	CPPFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
	LDFLAGS :   -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  
##############################
##############################
Changing dir from /home/u/Desktop/_working/workdir/x86_64 to ..
[17:54:13][DEBUG] cd ..
Changing dir from /home/u/Desktop/_working/workdir to ..
[17:54:13][DEBUG] cd ..
@bagder
Copy link
Member

@bagder bagder commented Apr 12, 2020

There are global variables named Curl_isVistaOrGreater and Curl_freq present in both libcurl and the client code. I'm sure this causes problems when the build can't hide non-exported symbols. I think a simple fix would be to stop the curl tool from using libcurl's private prefix (Curl_) for its variables.

Curl_freq:

lib/system_win32.c:LARGE_INTEGER Curl_freq;
src/tool_doswin.c:LARGE_INTEGER Curl_freq;

Curl_isVistaOrGreater:

lib/system_win32.c:bool Curl_isVistaOrGreater;
src/tool_doswin.c:bool Curl_isVistaOrGreater;
@bagder bagder added the Windows label Apr 12, 2020
bagder added a commit that referenced this issue Apr 13, 2020
To avoid collision risks with private libcurl symbols when linked with
static versions (or just versions not hiding internal symbols).

Reported-by: hydra3333 on github
Fixes #5219
hydra3333 added a commit to hydra3333/h3333_python_cross_compile_script_v100 that referenced this issue Apr 14, 2020
@bagder bagder closed this in 878214d Apr 14, 2020
@hydra3333
Copy link
Author

@hydra3333 hydra3333 commented Apr 14, 2020

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.