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

build problem cannot find boost #40

Open
MarcelKraemer opened this issue Aug 1, 2016 · 6 comments
Open

build problem cannot find boost #40

MarcelKraemer opened this issue Aug 1, 2016 · 6 comments

Comments

@MarcelKraemer
Copy link

Hello, I am trying to build bonefish on windows 10. I installed QT and use MinGW which came with QT. The necessary boost libraries are compiled and located at C:\boost_1_61_0. The bonefish resources are located in C:\bonefish-master. Within that folder I created a build-folder (C:\bonefish-master\bonefish-build). Out of this folder I run the command “cmake -G "MinGW Makefiles" ../”. While the build process I get the attached error message. Basically the boost library is not found. Now the question arises where and how I have to specify the path to the boost library. What about the RT_Library? Thanks a lot in advance. Cheers Marcel
cmake_cmd

CMakeOutput.TXT

@MarcelKraemer
Copy link
Author

Problem was solved by setting the environment variable BOOST_ROOT to "C:\boost_1_61_0". Not sure if that is an appropriate way to solve the issue. Aadditiaonally I had to compile the boost:ProgramOptions library as well. Maybe somone can add this dependency in the readme.

@MarcelKraemer
Copy link
Author

now it shows me another message "-- could NOT find RT". Is that a problem, or can I just ignore it?
2016-08-01 5

@davidchappelle
Copy link
Collaborator

I am not current with mingw build environments but according to this
article, there is no librt in Windows.

http://stackoverflow.com/questions/31054864/mingw-g-is-unable-to-link-with-libraries

Try using -lws2_32 instead of librt. Will have to tweak the cmake scripts
and do the right thing for mingw/Windows. If you can get prepare a patch
that would be great.

On Mon, Aug 1, 2016 at 8:05 AM, Marcel Kraemer [email protected]
wrote:

now it shows me another message "-- could NOT find RT". Is that a problem,
or can I just ignore it?
[image: 2016-08-01 5]
https://cloud.githubusercontent.com/assets/18499721/17293498/eb7e2eaa-57f0-11e6-85ed-9943a1d122bb.png


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#40 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACmyX-yIfWeJKGITiLuC6KwtSGBw-hgdks5qbeDwgaJpZM4JZZXF
.

@sourcerror
Copy link

For me it worked if I edited "CMakeCache.txt" to : RT_LIBRARY:FILEPATH=C:/mingw32/i686-w64-mingw32/lib/libws2_32.a

Unfortunately if I try to build using GCC 5.3.0 with Boost 1.60 on Windows 7, I get an error in https://github.com/tplgy/bonefish/blob/master/src/bonefish/session/wamp_session.hpp line 50.

The error says:

error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

Probably this is similar to the issue discussed here: http://stackoverflow.com/questions/4163126/dereferencing-type-punned-pointer-will-break-strict-aliasing-rules-warning
But I don't know the best way to solve it yet.

Kind regards, Nico

@davidchappelle
Copy link
Collaborator

Is that file/line correct? I see a line of whitespace at that location.

On Mon, Sep 19, 2016 at 10:16 AM, sourcerror [email protected]
wrote:

For me it worked if I edited "CMakeCache.txt" to : RT_LIBRARY:FILEPATH=C:/
mingw32/i686-w64-mingw32/lib/libws2_32.a

Unfortunately if I try to build using GCC 5.3.0 with Boost 1.60 on Windows
7, I get an error in https://github.com/tplgy/bonefish/blob/master/src/
bonefish/session/wamp_session.hpp line 50.

The error says:

error: dereferencing type-punned pointer will break strict-aliasing rules
[-Werror=strict-aliasing]

Probably this is similar to the issue discussed here:
http://stackoverflow.com/questions/4163126/dereferencing-type-punned-
pointer-will-break-strict-aliasing-rules-warning
But I don't know the best way to solve it yet.

Kind regards, Nico


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#40 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACmyX7nGFu8vy95F9T5WOAxobibI5sL6ks5qrplZgaJpZM4JZZXF
.

@sourcerror
Copy link

No, I don't know how I got to that link, I must have mixed things up (a lot) when I was trying to find out what the problem was. It comes from this code:

    {
       BOOST_STATIC_ASSERT(sizeof(T)==sizeof(long));
       long const res=BOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long*>(target),
                                                         *reinterpret_cast<long*>(&new_value),
                                                         *reinterpret_cast<long*>(&comparand));
       return *reinterpret_cast<T const*>(&res);
   }

Which is in the Boost Thread library: http://www.boost.org/doc/libs/1_60_0/boost/thread/win32/shared_mutex.hpp line 50 and aparently that should be fixed since Boost version 1.54 https://svn.boost.org/trac/boost/ticket/6652, but I don't see a way around it.
Probably that is my fault, as I also can't find where the shared_mutex is used yet.

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

3 participants