Skip to content

configure: Add dependent libraries after crypto - #2684

Closed
cmeister2 wants to merge 1 commit into
masterfrom
cmeister2/openssllinkerorder
Closed

cmeister2 wants to merge 1 commit into
masterfrom
cmeister2/openssllinkerorder

Conversation

@cmeister2

Copy link
Copy Markdown
Contributor

The linker is pretty dumb and processes things left to right, keeping a
tally of symbols it hasn't resolved yet. So, we need -ldl to appear
after -lcrypto otherwise the linker won't find the dl functions.


This appears to fix the fuzzer build, but would appreciate an extra set of eyes.

@cmeister2
cmeister2 requested a review from bagder June 26, 2018 08:37
Comment thread configure.ac

AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
LIBS="$CLEANLIBS -ldl -lpthread -lcrypto"
LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure why this suddenly uses CLEANLIBS, where the one above uses LIBS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe the previous one should use CLEANLIBS too, as LIBS already contains "-lcrypto" at that point and it adds it again...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I did wonder about that. Worth trying do you think?

@bagder bagder Jun 26, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not the end of the world, but sure, if you fixup that at the same time as you this fix, I approve!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bagder bagder added the build label Jun 26, 2018
The linker is pretty dumb and processes things left to right, keeping a
tally of symbols it hasn't resolved yet. So, we need -ldl to appear
after -lcrypto otherwise the linker won't find the dl functions.
@cmeister2
cmeister2 force-pushed the cmeister2/openssllinkerorder branch from eff0a7b to 1237081 Compare June 26, 2018 16:12
@cmeister2 cmeister2 closed this in b0a365f Jun 27, 2018
@cmeister2
cmeister2 deleted the cmeister2/openssllinkerorder branch June 27, 2018 07:59
@lock lock Bot locked as resolved and limited conversation to collaborators Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

2 participants