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

Add FreeBSD specific include #812

Merged
merged 2 commits into from Apr 20, 2016

Conversation

Projects
None yet
3 participants
@monwarez
Contributor

monwarez commented Mar 22, 2016

I am trying to get rigs of rods working again on FreeBSD.
Since I get some linking error with 270e084 (like multiple definition of function located at paged geometry). That's why I am looking to build the latest commit instead.
I finished the build but I am still getting multiple definition of function.
Example:

/usr/local/lib/libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.cpp.o): In function `MyGUI::OgreRenderManager::getTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
/usr/ports/x11-toolkits/mygui-ogre/work/mygui-MyGUI3.2.2/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:(.text+0x3060): multiple definition of `MyGUI::OgreRenderManager::getTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/lib/libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.cpp.o):/usr/ports/x11-toolkits/mygui-ogre/work/mygui-MyGUI3.2.2/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:(.text+0x3060): first defined here

I get same kind of error with paged geometry. And finally I get undefined reference for
Ogre::SharedPtr<Ogre::Texture>::~SharedPtr()
For the last one, I think it's an issue with mygui ogre plugin (because it is in libMyGUI.OgrePlatform.a).

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Mar 24, 2016

Contributor

Nice to see someone trying to get it to work on FreeBSD.

I get same kind of error with paged geometry. And finally I get undefined reference for
Ogre::SharedPtrOgre::Texture::~SharedPtr()

At which line of code is this? Are you building with C++11?

It's possible that some #ifdef (in the code itself or in the CMake files) don't trigger on FreeBSD, so I'd check that first.

Contributor

Hiradur commented Mar 24, 2016

Nice to see someone trying to get it to work on FreeBSD.

I get same kind of error with paged geometry. And finally I get undefined reference for
Ogre::SharedPtrOgre::Texture::~SharedPtr()

At which line of code is this? Are you building with C++11?

It's possible that some #ifdef (in the code itself or in the CMake files) don't trigger on FreeBSD, so I'd check that first.

@monwarez

This comment has been minimized.

Show comment
Hide comment
@monwarez

monwarez Mar 24, 2016

Contributor

Yes I am building with c++11(maybe I should try without). I have no idea about the line code, the error come at the very end when linking: bin/RoR.An another problem is that I am not 100% sure that my port of paged-geometry and caelum are really working, how can I test them ?

Contributor

monwarez commented Mar 24, 2016

Yes I am building with c++11(maybe I should try without). I have no idea about the line code, the error come at the very end when linking: bin/RoR.An another problem is that I am not 100% sure that my port of paged-geometry and caelum are really working, how can I test them ?

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Mar 24, 2016

Contributor

the error come at the very end when linking: bin/RoR

You may be missing an #include somewhere then. First you need to find out which header from Ogre declares this and then you have to add an include of that header to the code for the object file which is missing the reference to this function.

#include <OgrePrerequisites.h> may be the missing include from a quick search.

another problem is that I am not 100% sure that my port of paged-geometry and caelum are really working, how can I test them ?

There should be some samples included with these libraries. You can compile them and run them to see if it works.

Contributor

Hiradur commented Mar 24, 2016

the error come at the very end when linking: bin/RoR

You may be missing an #include somewhere then. First you need to find out which header from Ogre declares this and then you have to add an include of that header to the code for the object file which is missing the reference to this function.

#include <OgrePrerequisites.h> may be the missing include from a quick search.

another problem is that I am not 100% sure that my port of paged-geometry and caelum are really working, how can I test them ?

There should be some samples included with these libraries. You can compile them and run them to see if it works.

@ulteq

This comment has been minimized.

Show comment
Hide comment
@ulteq

ulteq Apr 20, 2016

Contributor

Does this really fix build errors on FreeBSD? If so, can we merge it?

Contributor

ulteq commented Apr 20, 2016

Does this really fix build errors on FreeBSD? If so, can we merge it?

@monwarez

This comment has been minimized.

Show comment
Hide comment
@monwarez

monwarez Apr 20, 2016

Contributor

It fix compiling stage, not linking stage. I think you can merge it. (It's to replace _GNU_SOURCE include with FreeBSD specific include : 'sys/sysinfo.h' replaced by 'sys/types.h' and sys/sysctl.h' see man sysctl: http://www.unix.com/man-page/FreeBSD/3/sysctl/)

Contributor

monwarez commented Apr 20, 2016

It fix compiling stage, not linking stage. I think you can merge it. (It's to replace _GNU_SOURCE include with FreeBSD specific include : 'sys/sysinfo.h' replaced by 'sys/types.h' and sys/sysctl.h' see man sysctl: http://www.unix.com/man-page/FreeBSD/3/sysctl/)

@ulteq ulteq merged commit 868a362 into RigsOfRods:master Apr 20, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment