configure.ac: append extra linker flags instead of prepending them. #2234

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

ComputerDruid commented Jan 12, 2018

Link order should list libraries after the libraries that use them,
so when we're guessing that we might also need to add -ldl in order
to use -lssl, we should add -ldl after -lssl.

configure.ac: append extra linker flags instead of prepending them.
Link order should list libraries after the libraries that use them,
so when we're guessing that we might also need to add -ldl in order
to use -lssl, we should add -ldl after -lssl.
Contributor

ComputerDruid commented Jan 12, 2018

Without this patch, I can't use a static openssl on ubuntu trusty LTS.

Dockerfile showing the exact sequence of steps that fails for me (with the git am line removed):

FROM ubuntu:trusty
RUN apt-get update && apt-get -y install build-essential git autoconf libtool pkg-config
RUN cd / && git clone -b OpenSSL_1_1_0g https://github.com/openssl/openssl && \
        (cd openssl && \
         ./config no-shared --prefix=/openssl/usr && \
         make -j8 && \
         make install_sw \
        )
ADD 0001-Append-linker-flags-instead-of-prepending-them.patch /
RUN cd / && git clone -b curl-7_57_0 https://github.com/curl/curl && \
        (cd curl && \
         git config user.name "Docker builder" && \
         git config user.email "noreply@google.com" && \
         git am /0001-Append-linker-flags-instead-of-prepending-them.patch && \
         ./buildconf && \
         ./configure --disable-shared --enable-static --with-ssl=/openssl/usr --with-default-ssl-backend=openssl && \
         make -j8 \
        )

@jay jay added the build label Jan 12, 2018

Thanks for the patch, looks good to me!

Member

MarcelRaad commented Jan 13, 2018

Wow, the Mac builds haven't even started after 11 hours. I'm going to merge anyway if that's OK @jay @bagder ?

Owner

bagder commented Jan 13, 2018

I'm okay with that!

Owner

jay commented Jan 13, 2018

the Mac builds haven't even started after 11 hours

Travis said they fixed it yesterday ("macOS builds have stabilised") but I've seen commits submitted after that time where the mac builds still haven't run, so they may have a backlog or it's not fully fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment