Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3632

libwccp.a(WccpMsg.o): undefined reference to symbol MD5_Final

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.0
    • Fix Version/s: 5.3.1, 6.0.0
    • Component/s: Build
    • Labels:
      None

      Description

      When building ATS 5.3.0 on Ubuntu >11.04[1,2] a linking failure occurs because of the ordering of the libraries:

      libtool: link: c++ -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pipe -Wall -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -mcx16 -rdynamic -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/traffic_manager AddConfigFilesHere.o traffic_manager.o StatProcessor.o StatType.o StatXML.o  ../../mgmt/web2/libweb.a ../../mgmt/api/.libs/libmgmtapilocal.a /«PKGBUILDDIR»/lib/ts/.libs/libtsutil.so -lssl -lcrypto -L/usr/lib ../../mgmt/.libs/libmgmt_lm.a ../../proxy/hdrs/libhdrs.a ../../lib/records/librecords_lm.a ../../lib/ts/.libs/libtsutil.so ../../iocore/eventsystem/libinkevent.a ../../proxy/shared/liberror.a ../../proxy/shared/libdiagsconfig.a -lresolv -ltcl8.5 -lhwloc -lm ../../lib/wccp/libwccp.a ../../lib/tsconfig/.libs/libtsconfig.so -lcap -lpcre -lz -lcrypt -lpthread -lrt -ldl /usr/lib/x86_64-linux-gnu/libxml2.so -Wl,-rpath -Wl,/usr/lib/trafficserver
      /usr/bin/ld: ../../lib/wccp/libwccp.a(WccpMsg.o): undefined reference to symbol 'MD5_Final@@OPENSSL_1.0.0'
      /usr/bin/ld: note: 'MD5_Final@@OPENSSL_1.0.0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so so try adding it to the linker command line
      /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so: could not read symbols: Invalid operation
      collect2: ld returned 1 exit status
      make[3]: *** [traffic_manager] Error 1
      make[3]: Leaving directory `/«PKGBUILDDIR»/cmd/traffic_manager'
      make[2]: *** [all-recursive] Error 1
      make[2]: Leaving directory `/«PKGBUILDDIR»/cmd'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/«PKGBUILDDIR»'
      dh_auto_build: make -j1 returned exit code 2
      make: *** [binary-arch] Error 2
      

      [1] https://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
      [2] https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user jbfavre opened a pull request:

          https://github.com/apache/trafficserver/pull/203

          Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'.…

          Fix for TS-3632

          While building ATS 5.3 for Debian, I had the exact same error as reported in TS-3632.
          I solved it adding OPENSSL_INCLUDE & OPENSSL_LIBS in Makefile.am.

          Now build & tests are OK.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/jbfavre/trafficserver fix_TS3632

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/trafficserver/pull/203.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #203


          commit 442f560ac4412a6cbbba6f69b029def418c9fbe8
          Author: Jean Baptiste Favre <jean-baptiste.favre@blablacar.com>
          Date: 2015-05-27T07:51:39Z

          Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'. Fix TS-3632


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user jbfavre opened a pull request: https://github.com/apache/trafficserver/pull/203 Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'.… Fix for TS-3632 While building ATS 5.3 for Debian, I had the exact same error as reported in TS-3632 . I solved it adding OPENSSL_INCLUDE & OPENSSL_LIBS in Makefile.am. Now build & tests are OK. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jbfavre/trafficserver fix_TS3632 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/trafficserver/pull/203.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #203 commit 442f560ac4412a6cbbba6f69b029def418c9fbe8 Author: Jean Baptiste Favre <jean-baptiste.favre@blablacar.com> Date: 2015-05-27T07:51:39Z Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'. Fix TS-3632
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 442f560ac4412a6cbbba6f69b029def418c9fbe8 in trafficserver's branch refs/heads/master from Jean Baptiste Favre
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=442f560 ]

          Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'. Fix TS-3632

          Show
          jira-bot ASF subversion and git services added a comment - Commit 442f560ac4412a6cbbba6f69b029def418c9fbe8 in trafficserver's branch refs/heads/master from Jean Baptiste Favre [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=442f560 ] Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'. Fix TS-3632
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/trafficserver/pull/203

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/trafficserver/pull/203
          Hide
          zwoop Leif Hedstrom added a comment -

          I assume this Jira can be closed? Jean Baptiste Favre Please make it so if completed.

          Show
          zwoop Leif Hedstrom added a comment - I assume this Jira can be closed? Jean Baptiste Favre Please make it so if completed.
          Hide
          jbfavre Jean Baptiste Favre added a comment -

          Can't find how to close it :-/
          Ticket has been assigned to me, but I'm not the initial reporter which might explain why I can't close it

          Show
          jbfavre Jean Baptiste Favre added a comment - Can't find how to close it :-/ Ticket has been assigned to me, but I'm not the initial reporter which might explain why I can't close it
          Hide
          zwoop Leif Hedstrom added a comment - - edited

          Maybe you have to logout and login again? (I gave your some karma to be able to assign Jira's to you earlier today). What you are looking for is to "Resolve" the issue btw.

          Show
          zwoop Leif Hedstrom added a comment - - edited Maybe you have to logout and login again? (I gave your some karma to be able to assign Jira's to you earlier today). What you are looking for is to "Resolve" the issue btw.
          Hide
          jbfavre Jean Baptiste Favre added a comment - - edited

          Did logout and login again, but I still can't close the issue.
          Can not find any "Resolve" nor "Close" button or menu entry

          Show
          jbfavre Jean Baptiste Favre added a comment - - edited Did logout and login again, but I still can't close the issue. Can not find any "Resolve" nor "Close" button or menu entry
          Hide
          zwoop Leif Hedstrom added a comment -

          Weird. Well, I closed it for you for now.

          Show
          zwoop Leif Hedstrom added a comment - Weird. Well, I closed it for you for now.
          Hide
          i.galic Igor Galić added a comment -

          we still have to merge this into 5.3.x

          Show
          i.galic Igor Galić added a comment - we still have to merge this into 5.3.x
          Hide
          zwoop Leif Hedstrom added a comment -

          Mark it for v5.3.1 back port proposal, and the RM will take it into consideration.

          Show
          zwoop Leif Hedstrom added a comment - Mark it for v5.3.1 back port proposal, and the RM will take it into consideration.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b2651964fd083237e8c505c4d0d603852c339f64 in trafficserver's branch refs/heads/master from Phil Sorber
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=b265196 ]

          TS-3632: Add to CHANGES

          Show
          jira-bot ASF subversion and git services added a comment - Commit b2651964fd083237e8c505c4d0d603852c339f64 in trafficserver's branch refs/heads/master from Phil Sorber [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=b265196 ] TS-3632 : Add to CHANGES
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 41f7209a6e74957d18790780f58374feea5a6eac in trafficserver's branch refs/heads/5.3.x from Jean Baptiste Favre
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=41f7209 ]

          TS-3632: Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'.

          (cherry picked from commit 442f560ac4412a6cbbba6f69b029def418c9fbe8)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 41f7209a6e74957d18790780f58374feea5a6eac in trafficserver's branch refs/heads/5.3.x from Jean Baptiste Favre [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=41f7209 ] TS-3632 : Solve 'undefined reference to symbol MD5_Final@@OPENSSL_1.0.0'. (cherry picked from commit 442f560ac4412a6cbbba6f69b029def418c9fbe8)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6f0e54499d0bc371a2bbfff821a342ad669414c2 in trafficserver's branch refs/heads/5.3.x from Phil Sorber
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=6f0e544 ]

          TS-3632: Add to CHANGES

          (cherry picked from commit b2651964fd083237e8c505c4d0d603852c339f64)

          Conflicts:
          CHANGES

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6f0e54499d0bc371a2bbfff821a342ad669414c2 in trafficserver's branch refs/heads/5.3.x from Phil Sorber [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=6f0e544 ] TS-3632 : Add to CHANGES (cherry picked from commit b2651964fd083237e8c505c4d0d603852c339f64) Conflicts: CHANGES
          Hide
          i.galic Igor Galić added a comment -

          i'd like to point out that this is still failing on 5.3.1: https://launchpadlibrarian.net/211818045/buildlog_ubuntu-precise-amd64.trafficserver_5.3.1-2ah3~precise1_BUILDING.txt.gz

          either our cherrypick wasn't such a success, or it's a regression, or something else.
          but it's still/again failing.

          Show
          i.galic Igor Galić added a comment - i'd like to point out that this is still failing on 5.3.1: https://launchpadlibrarian.net/211818045/buildlog_ubuntu-precise-amd64.trafficserver_5.3.1-2ah3~precise1_BUILDING.txt.gz either our cherrypick wasn't such a success, or it's a regression, or something else. but it's still/again failing.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user sodabrew commented on the pull request:

          https://github.com/apache/trafficserver/pull/203#issuecomment-126513201

          As noted by @igalic in https://issues.apache.org/jira/browse/TS-3632?focusedCommentId=14648395 I am still able to reproduce a similar problem when building a 5.3.1 package on Ubuntu Trusty - but this time with traffic_manager instead of traffic_wccp. I solved it as below:

          ``` diff
          — traffic_manager/Makefile.am.org 2015-07-30 22:46:21.074881421 +0000
          +++ traffic_manager/Makefile.am 2015-07-30 22:44:41.535809481 +0000
          @@ -67,5 +67,6 @@
          if BUILD_WCCP
          traffic_manager_LDADD += \
          $(top_builddir)/lib/wccp/libwccp.a \

          • $(top_builddir)/lib/tsconfig/libtsconfig.la
            + $(top_builddir)/lib/tsconfig/libtsconfig.la \
            + @OPENSSL_LIBS@
            endif
            ```

          I can submit this as a new PR if it looks like the right approach.

          Show
          githubbot ASF GitHub Bot added a comment - Github user sodabrew commented on the pull request: https://github.com/apache/trafficserver/pull/203#issuecomment-126513201 As noted by @igalic in https://issues.apache.org/jira/browse/TS-3632?focusedCommentId=14648395 I am still able to reproduce a similar problem when building a 5.3.1 package on Ubuntu Trusty - but this time with traffic_manager instead of traffic_wccp. I solved it as below: ``` diff — traffic_manager/Makefile.am.org 2015-07-30 22:46:21.074881421 +0000 +++ traffic_manager/Makefile.am 2015-07-30 22:44:41.535809481 +0000 @@ -67,5 +67,6 @@ if BUILD_WCCP traffic_manager_LDADD += \ $(top_builddir)/lib/wccp/libwccp.a \ $(top_builddir)/lib/tsconfig/libtsconfig.la + $(top_builddir)/lib/tsconfig/libtsconfig.la \ + @OPENSSL_LIBS@ endif ``` I can submit this as a new PR if it looks like the right approach.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zwoop commented on the pull request:

          https://github.com/apache/trafficserver/pull/203#issuecomment-126513769

          Also, since we closed TS-3632, please open a new Jira for this as well.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zwoop commented on the pull request: https://github.com/apache/trafficserver/pull/203#issuecomment-126513769 Also, since we closed TS-3632 , please open a new Jira for this as well.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 35f11dd5aab06364547d423e26b3d5bc31c4b1e1 in trafficserver's branch refs/heads/master from Aaron Stone
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=35f11dd ]

          TS-3806 Resolve undefined reference to symbol MD5_Final

          This is similar to TS-3632

          This closes #266

          Show
          jira-bot ASF subversion and git services added a comment - Commit 35f11dd5aab06364547d423e26b3d5bc31c4b1e1 in trafficserver's branch refs/heads/master from Aaron Stone [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=35f11dd ] TS-3806 Resolve undefined reference to symbol MD5_Final This is similar to TS-3632 This closes #266
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 35f11dd5aab06364547d423e26b3d5bc31c4b1e1 in trafficserver's branch refs/heads/6.0.x from Aaron Stone
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=35f11dd ]

          TS-3806 Resolve undefined reference to symbol MD5_Final

          This is similar to TS-3632

          This closes #266

          Show
          jira-bot ASF subversion and git services added a comment - Commit 35f11dd5aab06364547d423e26b3d5bc31c4b1e1 in trafficserver's branch refs/heads/6.0.x from Aaron Stone [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=35f11dd ] TS-3806 Resolve undefined reference to symbol MD5_Final This is similar to TS-3632 This closes #266

            People

            • Assignee:
              jbfavre Jean Baptiste Favre
              Reporter:
              i.galic Igor Galić
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development