[opensuse-packaging] Build fails during linking, but executing the command manually goes fine.
Hi,
I execute the following build command:
$ home:rbos/kfritz> osc build openSUSE_11.2 i586 kfritz.spec
The last part of the build fails, with the error attached
lib/libfritz++.a(FritzClient.cpp.o): In function
`fritz::FritzClient::CalculateLoginResponse(std::basic_string
On 15/02/10 18:36, Richard Bos wrote:
Hi,
I execute the following build command: $ home:rbos/kfritz> osc build openSUSE_11.2 i586 kfritz.spec The last part of the build fails, with the error attached
lib/libfritz++.a(FritzClient.cpp.o): In function `fritz::FritzClient::CalculateLoginResponse(std::basic_string
)': /usr/src/packages/BUILD/kfritz-0.0.1/libfritz++/FritzClient.cpp:73: undefined reference to `MD5'
The line that errors out, contains this code: MD5((unsigned char*)challengePwdConv, challengePwd.length()*2, hash);
libcrypto (-lcrypto) needs to be linked. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 2010-02-15 22:59, Cristian Rodríguez wrote:
On 15/02/10 18:36, Richard Bos wrote:
Hi,
I execute the following build command: $ home:rbos/kfritz> osc build openSUSE_11.2 i586 kfritz.spec The last part of the build fails, with the error attached
lib/libfritz++.a(FritzClient.cpp.o): In function `fritz::FritzClient::CalculateLoginResponse(std::basic_string
)': /usr/src/packages/BUILD/kfritz-0.0.1/libfritz++/FritzClient.cpp:73: undefined reference to `MD5' The line that errors out, contains this code: MD5((unsigned char*)challengePwdConv, challengePwd.length()*2, hash);
libcrypto (-lcrypto) needs to be linked.
libssl already has a DT_NEEDED link to libcrypto (as evidenced by ldd(1)), so -lcrypto is not explicitly required. For what it's worth, I cannot reproduce this compile error using either Lbuild-jplus (osc build without the osc) or the SUSE OBS. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Op maandag 15 februari 2010 23:26:33 schreef Jan Engelhardt:
On Monday 2010-02-15 22:59, Cristian Rodríguez wrote:
On 15/02/10 18:36, Richard Bos wrote:
Hi,
I execute the following build command: $ home:rbos/kfritz> osc build openSUSE_11.2 i586 kfritz.spec The last part of the build fails, with the error attached
lib/libfritz++.a(FritzClient.cpp.o): In function `fritz::FritzClient::CalculateLoginResponse(std::basic_string
)': /usr/src/packages/BUILD/kfritz-0.0.1/libfritz++/FritzClient.cpp:73: undefined reference to `MD5' The line that errors out, contains this code: MD5((unsigned char*)challengePwdConv, challengePwd.length()*2, hash);
libcrypto (-lcrypto) needs to be linked.
libssl already has a DT_NEEDED link to libcrypto (as evidenced by ldd(1)), so -lcrypto is not explicitly required.
But still it is the solution. When adding libcrypto to linker line, it worked.
For what it's worth, I cannot reproduce this compile error using either Lbuild-jplus (osc build without the osc) or the SUSE OBS.
I use: $ # rpm -q osc build osc-0.120-2.1.x86_64 build-2009.09.23-2.3.1.noarch -- Richard -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Jan Engelhardt (jengelh@medozas.de) [20100215 23:27]:
libssl already has a DT_NEEDED link to libcrypto (as evidenced by ldd(1)), so -lcrypto is not explicitly required.
It is, in order for the linker to resolve external references. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Op maandag 15 februari 2010 22:59:56 schreef Cristian Rodríguez:
I execute the following build command: $ home:rbos/kfritz> osc build openSUSE_11.2 i586 kfritz.spec The last part of the build fails, with the error attached
lib/libfritz++.a(FritzClient.cpp.o): In function `fritz::FritzClient::CalculateLoginResponse(std::basic_string
)': /usr/src/packages/BUILD/kfritz-0.0.1/libfritz++/FritzClient.cpp:73: undefined reference to `MD5' The line that errors out, contains this code: MD5((unsigned char*)challengePwdConv, challengePwd.length()*2, hash);
libcrypto (-lcrypto) needs to be linked.
Thanks that's the solution indeed! Any idea why the build failed with 'osc build .... kfritz.spec' and why the build succeeded when I run the exact same command (copy and pasted) in the chroot from the command line? -- Richard -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Richard Bos (rbos@opensuse.org) [20100216 20:17]:
Any idea why the build failed with 'osc build .... kfritz.spec' and why the build succeeded when I run the exact same command (copy and pasted) in the chroot from the command line?
I guess because osc build adds --as-needed to the link options and that in turn lets the linker add DT_NEEDED only for libraries explicitely passed to it and whose symbols are indeed referenced. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 2010-02-16 20:41, Cristian Rodríguez wrote:
On 16/02/10 16:39, Philipp Thomas wrote:
I guess because osc build adds --as-needed to the link options
Yes, that's it.
But isn't the SUSE OBS doing the same? If so, why am I getting success then? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Op dinsdag 16 februari 2010 20:39:33 schreef Philipp Thomas:
* Richard Bos (rbos@opensuse.org) [20100216 20:17]:
Any idea why the build failed with 'osc build .... kfritz.spec' and why the build succeeded when I run the exact same command (copy and pasted) in the chroot from the command line?
I guess because osc build adds --as-needed to the link options and that in turn lets the linker add DT_NEEDED only for libraries explicitely passed to it and whose symbols are indeed referenced.
Thanks for the explaination! -- Richard -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (5)
-
Cristian Rodríguez
-
Jan Engelhardt
-
Philipp Thomas
-
Philipp Thomas
-
Richard Bos