Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stlink.pc not installed #944

Closed
Vascom opened this issue Apr 21, 2020 · 14 comments · Fixed by #947
Closed

stlink.pc not installed #944

Vascom opened this issue Apr 21, 2020 · 14 comments · Fixed by #947

Comments

@Vascom
Copy link
Collaborator

Vascom commented Apr 21, 2020

Time for next bugreport :)

Now stlink.pc file not installed at all.

It should be installed to /usr/lib64/pkgconfig/
lib64 - current libdir.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Apr 21, 2020

Possible, as package configuration is rewritten currently.
The whole procedure is refactored, so don't bother about it too much yet.
I just did not open a separate ticket for it as I am working on it myself...
Please stay with fc72b92 if you need a working old configuration. If you find the same there, then it is an older problem not related to current changes.

@Nightwalker-87
Copy link
Member

@Vascom: Can you test the current pkg branch now and report back?

@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

One moment.

@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

stlink.pc not installed at all.
Are you forgot add cmake/pkgconfig to main CMakeLists.txt?
Full build log https://paste.centos.org/view/b4546f4d

@Nightwalker-87
Copy link
Member

Don't expect it to work on the develop branch, changes were only made on the latest pkg branch.
Should it not work there, then I have no clue, sry.

@Nightwalker-87
Copy link
Member

Something is not right at your end, at least. The version string reads 1.6.1 which is not present yet. I don't know where your build routine got this from. It should still be 1.6.0. The former has not been defined anywhere in the code yet.

@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

Do you mean stlink-1.6.1-0.1.20200420git78dd836?
It is version in my spec file. It is not affect build.

@Nightwalker-87
Copy link
Member

I know it does not affect the build, but I knew it was not from the provided settings. However I can't figure out the problem right now. So I suggest you stay on the old version for know or look into the details yourself. I never had any error on this so far on my system. (I doubt though these settings are even used on debian-based systems. If so, then my build system has no problem with it.)

@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

To be as in 1.6.0 you should

  1. Copy https://raw.githubusercontent.com/stlink-org/stlink/v1.6.0/usr/lib/pkgconfig/CMakeLists.txt to cmake/pkgconfig/ and replace existing CMakeLists.txt there.
  2. Copy https://raw.githubusercontent.com/stlink-org/stlink/v1.6.0/usr/lib/pkgconfig/pkg-config.pc.cmake to cmake/pkgconfig/ and remove pkgconfig.pc.cmake.
  3. Add add_subdirectory(cmake/pkgconfig) to main CMakeLists.txt.

With this change all work.

@Nightwalker-87
Copy link
Member

Try the new version, it is not exactly the same though as you propose.

@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

Looks good and work.

But may be at x86_64 this
libdir=${prefix}/lib/${deb_host_multiarch}
must be
libdir=${prefix}/lib64/${deb_host_multiarch}

I am not sure.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Apr 23, 2020

No, because the tools still build a 32-bit library, also for 64-bit systems that's why it should install to libdir=${prefix}/lib/${deb_host_multiarch}.

To me this should be fine now then as it works for you and the settings are read from the newly introduced folder structure. This issue will close automatically with the next commit.

Nightwalker-87 added a commit that referenced this issue Apr 23, 2020
@Vascom
Copy link
Collaborator Author

Vascom commented Apr 23, 2020

I built for 64-bit. And I look at other .pc files in my system - it has lib64 in .pc files.
So it is important.

Can you use some variable to set lib on 32-bit builds and lib64 on 64-bit builds?

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Apr 23, 2020

I'm not really willing to currently, because the library is still coded 32-bit, even if you build for 64-bit, as the st-link code is not written for 64-bit (this is also not planned in the foreseeable future). This is likely the reason why lib is not changed to lib64.

@Nightwalker-87 Nightwalker-87 linked a pull request Apr 26, 2020 that will close this issue
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jun 28, 2020
@Nightwalker-87 Nightwalker-87 moved this to Done in Release v1.6.1 Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants