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

Swiften_Boost is not built when the libboost debian packages are installed #34

Closed
lnjX opened this issue Nov 16, 2016 · 17 comments
Closed

Comments

@lnjX
Copy link

lnjX commented Nov 16, 2016

I tried to built swiften 3.0, but it didn't built 3rdParty/Boost/libSwiften_Boost.a, because I had the debian packages for boost installed, but these packages do NOT include Swiften_Boost, so I couldn't build my project. (I removed libboost-all-dev on my system, now, but it would be nice if this could be fixed)

@vitalyster
Copy link
Contributor

You should get actual linker flags from swiften-config output and should not link Swiften_Boost explicitly

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

I HAVE used the actual linker flags, but Swiften_Boost was not built.

@vitalyster
Copy link
Contributor

It is intended, linker flags will have references to system boost in this case

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

Yeah, but my system had no Swiften_Boost, it only had Boost and Swiften_Boost was not builded.

@tfar
Copy link
Collaborator

tfar commented Nov 16, 2016

What does the scons config output look like?

@vitalyster
Copy link
Contributor

@LNJ2 if you have uninstalled system boost, then you need to rebuild Swiften, scons will re-check Boost presence and will enable building and linking bundled boost copy

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

Just to clarify: Everything is working for me

I just want to say that when the boost packages are installed on my system, it won't build Swiften_Boost.

I have removed the libboost packages from my system and then Boost and SwiftenBoost were built.
Just install libboost-all-dev (on debian sid) and you will get the same as I had.

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

@vitalyster I know I have to rebuild it.

@vitalyster
Copy link
Contributor

vitalyster commented Nov 16, 2016

@LNJ2 building bundled boost is a "last resort" when scons is unable to find system one
No need to have multiple copy of boost libraries in most cases

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

@vitalyster You might wonder, but I also know that.

@tfar
Copy link
Collaborator

tfar commented Nov 16, 2016

@LNJ2 So what is the actual issue here? The build of Swiften fails if only some boost dependencies are installed?

@lnjX
Copy link
Author

lnjX commented Nov 16, 2016

@tfar Why is scons (or whatever) not building Swiften_Boost, if this part is missing?

@vitalyster
Copy link
Contributor

@LNJ2 your actual problem still isn't clear. scons checks at configure time presence of boost and prefer system one, it shouldn't build Swiften_Boost when system one is present, it's by design.

@Kev
Copy link
Member

Kev commented Nov 17, 2016

Hi there,
To check that I understand your problem correctly:

  1. You have your own application that uses libSwiften
  2. You compiled Swiften on a system that has the system Boost installed
  3. Building Swiften did not generate libSwiften_Boost
  4. Your application failed to link, because your build system tries to link against libSwiften_Boost.
    (And then you uninstalled the system Boost, rebuilt Swiften, it built libSwiften_Boost, and your build system was happy)

Is that right?

@lnjX
Copy link
Author

lnjX commented Nov 17, 2016

@Kev That's exactly what I did (to be exact, someone else of my 'team' created the project and I tried to build it).

I think I can understand you now ... libBoost and libSwiften_Boost are the same, but have different names? (I thought that Swiften_Boost would be something like an 'extension' for Boost ...)

@Kev
Copy link
Member

Kev commented Nov 17, 2016

Yes, Swiften_Boost is the name of the boost library if Swift has to compile it.
You should run Swiften's swiften-config tool as part of your build system, which will tell you which libraries need to be linked in for the particular way Swiften's been built on that machine.

In your case, it would have told you the system Boost libraries that were used and needed to be linked, and wouldn't have said Swiften_Boost.

Closing this as I think it's clear at this point that the bug isn't in Swiften.

@Kev Kev closed this as completed Nov 17, 2016
@lnjX
Copy link
Author

lnjX commented Nov 17, 2016

Sorry and Thank you guys. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants