vanilla build of 7.7p1 release on linux/4.17 fails with gcc8 @ "/usr/bin/ld: unrecognized option '-Wl,-z,retpolineplt'"

PGNet Dev pgnet.dev at gmail.com
Fri Jun 8 11:21:03 AEST 2018


fyi

add'l -- and looks unrelated -- issue

with either of

	LD=gcc
	unset LD

explicitly adding

	--with-pam

to config, results in a build fail around pthreads

	...
	/usr/bin/gcc-8 -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -mfunction-return=thunk -mindirect-branch=thunk -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-strong -fPIE   -I. -I. -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -DSSHDIR=\"/usr/local/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/lib/sshd\" -DHAVE_CONFIG_H -c sftp-server.c -o sftp-server.o
	auth-pam.c:179:1: error: static declaration of ‘pthread_exit’ follows non-static declaration
	 pthread_exit(void *value)
	 ^~~~~~~~~~~~
	In file included from /usr/include/openssl/crypto.h:415,
	                 from /usr/include/openssl/bio.h:20,
	                 from /usr/include/openssl/objects.h:915,
	                 from buffer.h:50,
	                 from entropy.h:28,
	                 from includes.h:177,
	                 from auth-pam.c:50:
	/usr/include/pthread.h:243:13: note: previous declaration of ‘pthread_exit’ was here
	 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
	             ^~~~~~~~~~~~
	auth-pam.c:186:1: error: conflicting types for ‘pthread_create’
	 pthread_create(sp_pthread_t *thread, const void *attr,
	 ^~~~~~~~~~~~~~
	In file included from /usr/include/openssl/crypto.h:415,
	                 from /usr/include/openssl/bio.h:20,
	                 from /usr/include/openssl/objects.h:915,
	                 from buffer.h:50,
	                 from entropy.h:28,
	                 from includes.h:177,
	                 from auth-pam.c:50:
	/usr/include/pthread.h:234:12: note: previous declaration of ‘pthread_create’ was here
	 extern int pthread_create (pthread_t *__restrict __newthread,
	            ^~~~~~~~~~~~~~
	auth-pam.c:212:1: error: conflicting types for ‘pthread_cancel’
	 pthread_cancel(sp_pthread_t thread)
	 ^~~~~~~~~~~~~~
	In file included from /usr/include/openssl/crypto.h:415,
	                 from /usr/include/openssl/bio.h:20,
	                 from /usr/include/openssl/objects.h:915,
	                 from buffer.h:50,
	                 from entropy.h:28,
	                 from includes.h:177,
	                 from auth-pam.c:50:
	/usr/include/pthread.h:514:12: note: previous declaration of ‘pthread_cancel’ was here
	 extern int pthread_cancel (pthread_t __th);
	            ^~~~~~~~~~~~~~
	auth-pam.c:220:1: error: conflicting types for ‘pthread_join’
	 pthread_join(sp_pthread_t thread, void **value)
	 ^~~~~~~~~~~~
	In file included from /usr/include/openssl/crypto.h:415,
	                 from /usr/include/openssl/bio.h:20,
	                 from /usr/include/openssl/objects.h:915,
	                 from buffer.h:50,
	                 from entropy.h:28,
	                 from includes.h:177,
	                 from auth-pam.c:50:
	/usr/include/pthread.h:251:12: note: previous declaration of ‘pthread_join’ was here
	 extern int pthread_join (pthread_t __th, void **__thread_return);
	            ^~~~~~~~~~~~
	make: *** [Makefile:160: auth-pam.o] Error 1


More information about the openssh-unix-dev mailing list