Trying to compile an app from 15.2 and it fails. The simplest way to describe this is to take the sample code from the encrypt man page and try to build it on 15.2 and 15.3. It builds with no errors and works on 15.2 but here is what I get with 15.3. cc encrypt.c -o encrypt -lcrypt encrypt.c: In function ‘main’: encrypt.c:25:9: warning: implicit declaration of function ‘setkey’; did you mean ‘setgid’? [-Wimplicit-function-declaration] setkey(key); ^~~~~~ setgid encrypt.c:29:5: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration] encrypt(buf, 0); ^~~~~~~ crypt /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEYoHXm.o: in function `main': encrypt.c:(.text+0xa1): undefined reference to `setkey' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0xda): undefined reference to `encrypt' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0x188): undefined reference to `encrypt' collect2: error: ld returned 1 exit status So where have this set of functions gone? Regards mark
Jun 4, 2021 16:47:05 Mark Hounschell <markh@compro.net>:
Trying to compile an app from 15.2 and it fails. The simplest way to describe this is to take the sample code from the encrypt man page and try to build it on 15.2 and 15.3.
It builds with no errors and works on 15.2 but here is what I get with 15.3.
cc encrypt.c -o encrypt -lcrypt encrypt.c: In function ‘main’: encrypt.c:25:9: warning: implicit declaration of function ‘setkey’; did you mean ‘setgid’? [-Wimplicit-function-declaration] setkey(key); ^~~~~~ setgid encrypt.c:29:5: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration] encrypt(buf, 0); ^~~~~~~ crypt /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEYoHXm.o: in function `main': encrypt.c:(.text+0xa1): undefined reference to `setkey' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0xda): undefined reference to `encrypt' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0x188): undefined reference to `encrypt' collect2: error: ld returned 1 exit status
So where have this set of functions gone?
Regards mark Hi, Have you checked if library versions are the same? If not, maybe update of used library causes this behavior :)
That's indeed interesting. Our glibc depends on libxcrypt for functions 'setkey' and 'encrypt' and 'crypt' library. libxcrypt has those defined somewhere in internal headers https://github.com/besser82/libxcrypt/commit/0e86b596a9ea170e2cc3863979e56e1... So I guess that glibc's unistd.h should define those headers, but it does not. I suggest reporting it on bugzilla. W dniu 04.06.2021 o 16:46, Mark Hounschell pisze:
Trying to compile an app from 15.2 and it fails. The simplest way to describe this is to take the sample code from the encrypt man page and try to build it on 15.2 and 15.3.
It builds with no errors and works on 15.2 but here is what I get with 15.3.
cc encrypt.c -o encrypt -lcrypt encrypt.c: In function ‘main’: encrypt.c:25:9: warning: implicit declaration of function ‘setkey’; did you mean ‘setgid’? [-Wimplicit-function-declaration] setkey(key); ^~~~~~ setgid encrypt.c:29:5: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration] encrypt(buf, 0); ^~~~~~~ crypt /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEYoHXm.o: in function `main': encrypt.c:(.text+0xa1): undefined reference to `setkey' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0xda): undefined reference to `encrypt' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0x188): undefined reference to `encrypt' collect2: error: ld returned 1 exit status
So where have this set of functions gone?
Regards mark
On 6/4/21 11:41 AM, Adam Mizerski wrote:
That's indeed interesting. Our glibc depends on libxcrypt for functions 'setkey' and 'encrypt' and 'crypt' library. libxcrypt has those defined somewhere in internal headers https://github.com/besser82/libxcrypt/commit/0e86b596a9ea170e2cc3863979e56e1...
So I guess that glibc's unistd.h should define those headers, but it does not.
I suggest reporting it on bugzilla.
W dniu 04.06.2021 o 16:46, Mark Hounschell pisze:
Trying to compile an app from 15.2 and it fails. The simplest way to describe this is to take the sample code from the encrypt man page and try to build it on 15.2 and 15.3.
It builds with no errors and works on 15.2 but here is what I get with 15.3.
cc encrypt.c -o encrypt -lcrypt encrypt.c: In function ‘main’: encrypt.c:25:9: warning: implicit declaration of function ‘setkey’; did you mean ‘setgid’? [-Wimplicit-function-declaration] setkey(key); ^~~~~~ setgid encrypt.c:29:5: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration] encrypt(buf, 0); ^~~~~~~ crypt /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEYoHXm.o: in function `main': encrypt.c:(.text+0xa1): undefined reference to `setkey' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0xda): undefined reference to `encrypt' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0x188): undefined reference to `encrypt' collect2: error: ld returned 1 exit status
So where have this set of functions gone?
Regards mark
The actual functions appear to be removed from -lcrypt also. This can't be an accident. Mark
On 6/4/21 11:41 AM, Adam Mizerski wrote:
That's indeed interesting. Our glibc depends on libxcrypt for functions 'setkey' and 'encrypt' and 'crypt' library. libxcrypt has those defined somewhere in internal headers https://github.com/besser82/libxcrypt/commit/0e86b596a9ea170e2cc3863979e56e1...
So I guess that glibc's unistd.h should define those headers, but it does not.
I suggest reporting it on bugzilla.
W dniu 04.06.2021 o 16:46, Mark Hounschell pisze:
Trying to compile an app from 15.2 and it fails. The simplest way to describe this is to take the sample code from the encrypt man page and try to build it on 15.2 and 15.3.
It builds with no errors and works on 15.2 but here is what I get with 15.3.
cc encrypt.c -o encrypt -lcrypt encrypt.c: In function ‘main’: encrypt.c:25:9: warning: implicit declaration of function ‘setkey’; did you mean ‘setgid’? [-Wimplicit-function-declaration] setkey(key); ^~~~~~ setgid encrypt.c:29:5: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration] encrypt(buf, 0); ^~~~~~~ crypt /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEYoHXm.o: in function `main': encrypt.c:(.text+0xa1): undefined reference to `setkey' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0xda): undefined reference to `encrypt' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: encrypt.c:(.text+0x188): undefined reference to `encrypt' collect2: error: ld returned 1 exit status
So where have this set of functions gone?
Regards mark
Bug 1186882 Submitted Mark
participants (3)
-
Adam Mizerski
-
Damian
-
Mark Hounschell