Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 501
    • Issues 501
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Merge requests
  • !1417

[#2049] prevent empty location appended to rpath

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Andrei Pavel requested to merge 2049-ax-find-library-rpath into master Sep 18, 2021
  • Overview 3
  • Commits 2
  • Changes 2

Closes #2049 (closed)

For any normal Unix, this is the output of a pkg-config:

$ pkg-config --libs /usr/local/lib/pkgconfig/libyang.pc
-L/usr/local/lib -lyang

For Fedora 34, with the same .pc file:

$ pkg-config --libs /usr/lib64/pkgconfig/libyang.pc
-lyang

-L is missing.

For any normal Unix, the final flags end up being:

-L/usr/local/lib -lyang -Wl,-R/usr/local/lib -lyang -L/usr/local/lib -lyang-cpp -Wl,-R/usr/local/lib -lyang-cpp

Notice the rpath flags -Wl,-R.

But because -L is missing, which is used to take the location from to be passed to -Wl,-R, on Fedora, these are:

-lsysrepo -Wl,-R -lyang -Wl,-R -lyang-cpp -Wl,-R -lsysrepo-cpp -Wl,-R

The empty -Wl,-R is causing undefined reference to std::ios_base::Init::Init(). I don't know why exactly, but I tested this on a separate file, and removing the empty flag gets rid of the linking error.

ut-extended job where this happens

I also made sure YANG repo in created in hammer in a separate commit.

Test run with these changes (watch for Fedora 34 especially): https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/ut-extended/82/

Edited Sep 18, 2021 by Andrei Pavel
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2049-ax-find-library-rpath