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

14v22 and gcc 10 produces a linker error #23

Closed
fscheiner opened this issue Sep 17, 2020 · 2 comments
Closed

14v22 and gcc 10 produces a linker error #23

fscheiner opened this issue Sep 17, 2020 · 2 comments

Comments

@fscheiner
Copy link

When trying to create GSI-OpenSSH 8.3p1 packages for Fedora 32 with the HPN patch(es) included - for gridcf/gct#108 - on the openSUSE Build Service (OBS) I get a linker error during build, see https://build.opensuse.org/package/live_build_log/home:frank_scheiner:gct-fedora-32/gsi-openssh/Fedora_32/x86_64 for details. The build process uses gcc 10:

[...]
[  212s] cc -o sshd sshd.o auth-rhosts.o auth-passwd.o audit.o audit-bsm.o audit-linux.o platform.o sshpty.o sshlogin.o servconf.o serverloop.o auth.o auth2.o auth-options.o session.o auth2-chall.o groupaccess.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o monitor.o monitor_wrap.o auth-krb5.o auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o gss-serv-gsi.o loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o sftp-server.o sftp-common.o sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o sandbox-seccomp-filter.o sandbox-capsicum.o sandbox-pledge.o sandbox-solaris.o uidswap.o ssh-sk-client.o -L. -Lopenbsd-compat/  -pie -z relro -z now -fstack-protector-strong  -lssh -lopenbsd-compat -laudit -lpam -lsystemd  -lcrypto -ldl -lutil -lz  -lcrypt -lresolv -lselinux -lglobus_gss_assist -lglobus_gssapi_gsi -lglobus_common  -lpthread  
[  212s] /usr/bin/ld: session.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:25: multiple definition of `start_time'; serverloop.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:25: first defined here
[  212s] /usr/bin/ld: session.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:24: multiple definition of `fdout_bytes'; serverloop.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:24: first defined here
[  212s] /usr/bin/ld: session.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:23: multiple definition of `stdin_bytes'; serverloop.o:/home/abuild/rpmbuild/BUILD/openssh-8.3p1/serverloop.h:23: first defined here
[  213s] collect2: error: ld returned 1 exit status
[...]

It complains about multiple definitions of start_time, fdout_bytes and stdin_bytes. Both session.c and serverloop.c include serverloop.h where these seem to come from and this seems to make a problem with gcc 10 which defaults to -fno-common according to https://gcc.gnu.org/gcc-10/porting_to.html.

Actually the ssh struct (from packet.h) also defines vars with the same name. And the identically named vars in serverloop.h were not there in older versions of the HPN patches (e.g. 14v19), so are these really needed now?

@rapier1
Copy link
Owner

rapier1 commented Sep 24, 2020

Fixed in the latest commits. This was also back ported to 8.0, 8.1, and 8.2.

@rapier1 rapier1 closed this as completed Sep 24, 2020
@fscheiner
Copy link
Author

@rapier1
Much obliged. :-) GSI-OpenSSH packages w/HPN for EPEL 8 (gsi-openssh-8.0p1-5.1) and Fedora 32 (gsi-openssh-8.3p1-5.1) were already updated. More to come in the future.

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

No branches or pull requests

2 participants