Jump to content

Installation on CentOS 7


gw1500se
 Share

Recommended Posts

Thanks again. These prereqs are a royal pain and a confusing, tangled web with all the different versions. I guess I am still making progress but now it looks like I have a curl issue:

Preprocessor.cpp
In file included from ../../../source/lib/external_libraries/curl.h:50:0,
                 from ../../../source/ps/ModIo.h:26,
                 from ../../../source/ps/ModIo.cpp:25:
../../../source/ps/ModIo.cpp: In member function ‘CURLMcode ModIo::SetupRequest(const string&, bool)’:
../../../source/ps/ModIo.cpp:193:28: error: ‘CURLOPT_XFERINFOFUNCTION’ was not declared in this scope
   curl_easy_setopt(m_Curl, CURLOPT_XFERINFOFUNCTION, DownloadProgressCallback);
                            ^
../../../source/ps/ModIo.cpp:194:28: error: ‘CURLOPT_XFERINFODATA’ was not declared in this scope
   curl_easy_setopt(m_Curl, CURLOPT_XFERINFODATA, (void*)&m_DownloadProgressData);
                            ^
make[1]: *** [obj/engine_Release/ModIo.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [engine] Error 2

I'm using libcurl-devel.x86_64-7.29.0-46.el7 from the CentOS 7 base repository.

Edited by gw1500se
Link to comment
Share on other sites

OK, I found and installed, from source, curl 7-32. I think I am at the last layer of the onion. It is linking pyrogenesis:

==== Building pyrogenesis (release) ====
main.cpp
Linking pyrogenesis
../../../binaries/system/liblowlevel.a(file_system.o): In function `copy_file':
/usr/include/boost/filesystem/operations.hpp:381: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
/usr/include/boost/filesystem/operations.hpp:384: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis] Error 1
make: *** [pyrogenesis] Error 2

I don't know what boost is but I installed boost-devel.x86_64-1.53.0-27.el7. I also have the 32-bit version installed for some reason but would that confuse things?

Link to comment
Share on other sites

It probably is https://svn.boost.org/trac10/ticket/10038 creeping up somehow. However, it is weird since that bug was closed as fixed for 1.57.

Could you perhaps try changing to this in "source/lib/pch/pch_boost.h"?

#define BOOST_NO_CXX11_SCOPED_ENUMS
#include <boost/filesystem.hpp>
#undef BOOST_NO_CXX11_SCOPED_ENUMS

If that does not work, I have no idea how to fix it.

Edited by Guest
Link to comment
Share on other sites

I don't find that code in the source. This is the only segment that reverences filesystem.hpp:

#ifndef INCLUDED_PCH_BOOST
#define INCLUDED_PCH_BOOST

#include "lib/external_libraries/suppress_boost_warnings.h"

#if MSC_VERSION
# define BOOST_HAS_STDINT_H
#endif

// Boost
// .. if this package isn't going to be statically linked, we're better off
// using Boost via DLL. (otherwise, we would have to ensure the exact same
// compiler is used, which is a pain because MSC8, MSC9 and ICC 10 are in use)
#ifndef LIB_STATIC_LINK
# define BOOST_ALL_DYN_LINK
#endif

// don't compile get_system_category() etc, since we don't use them and they
// sometimes cause problems when linking.
// But Filesystem <= 1.43 requires boost::system::posix, so only disable if newer
#include <boost/version.hpp>
#if BOOST_VERSION >= 104400
# define BOOST_SYSTEM_NO_DEPRECATED
#endif

// the following boost libraries have been included in TR1 and are
// thus deemed usable:
#if BOOST_VERSION >= 104400
// Filesystem v3 is included since Boost 1.44
// v2 is deprecated since 1.46 and removed entirely in 1.50
# define BOOST_FILESYSTEM_VERSION 3
#else
# define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;

#endif  // #ifndef INCLUDED_PCH_BOOST

 

Link to comment
Share on other sites

No joy. Just to make sure I understood your suggestion, this is what I did:

#ifndef INCLUDED_PCH_BOOST
#define INCLUDED_PCH_BOOST

#include "lib/external_libraries/suppress_boost_warnings.h"

#if MSC_VERSION
# define BOOST_HAS_STDINT_H
#endif

// Boost
// .. if this package isn't going to be statically linked, we're better off
// using Boost via DLL. (otherwise, we would have to ensure the exact same
// compiler is used, which is a pain because MSC8, MSC9 and ICC 10 are in use)
#ifndef LIB_STATIC_LINK
# define BOOST_ALL_DYN_LINK
#endif

// don't compile get_system_category() etc, since we don't use them and they
// sometimes cause problems when linking.
// But Filesystem <= 1.43 requires boost::system::posix, so only disable if newer
#include <boost/version.hpp>
#if BOOST_VERSION >= 104400
# define BOOST_SYSTEM_NO_DEPRECATED
#endif

// the following boost libraries have been included in TR1 and are
// thus deemed usable:
#if BOOST_VERSION >= 104400
// Filesystem v3 is included since Boost 1.44
// v2 is deprecated since 1.46 and removed entirely in 1.50
# define BOOST_FILESYSTEM_VERSION 3
#else
# define BOOST_FILESYSTEM_VERSION 2
#endif
#define BOOST_NO_CXX11_SCOPED_ENUMS
#include <boost/filesystem.hpp>
#undef BOOST_NO_CXX11_SCOPED_ENUMS
namespace fs = boost::filesystem;

#endif  // #ifndef INCLUDED_PCH_BOOST

 

Link to comment
Share on other sites

You understood it correctly.

Maybe someone else here knows?

Edit: Sure you have the 1.57 release version and not the beta? You probably do, but just checking. The fix wasn't included in the beta.

Edited by Guest
Link to comment
Share on other sites

I'm not sure if I have it or not. In my file they end with '-mt':

LIBS += -Wl,--start-group ../../../binaries/system/libmocks_real.a ../../../binaries/system/libnetwork.a ../../../binaries/system
/libtinygettext.a ../../../binaries/system/liblobby.a ../../../binaries/system/libglooxwrapper.a ../../../binaries/system/libsimulation2.a
../../../binaries/system/libscriptinterface.a ../../../binaries/system/libengine.a ../../../binaries/system/libgraphics.a ../../../binaries
/system/libatlas.a ../../../binaries/system/libgui.a ../../../binaries/system/liblowlevel.a ../../../binaries/system/libmongoose.a -Wl,--end-
group -lGL -lSDL2 -lpng -lz -lmozjs38-ps-release -lxml2 -lboost_filesystem-mt -lboost_system-mt -lenet -lcurl -licui18n -licuuc -lsodium
-lX11 -lXcursor -lopenal -lvorbisfile -lnvcore -lnvmath -lnvimage -lnvtt -lgloox -lminiupnpc -lrt -ldl

 

Link to comment
Share on other sites

Here is mine

LIBS += -Wl,--start-group ../../../binaries/system/libmocks_real.a ../../../binaries/system/libnetwork.a ../../../binaries/system/libtinygettext.a ../../../binaries/system/liblobby.a ../../../binaries/system/libglooxwrapper.a ../../../binaries/system/libsimulation2.a ../../../binaries/system/libscriptinterface.a ../../../binaries/system/libengine.a ../../../binaries/system/libgraphics.a ../../../binaries/system/libatlas.a ../../../binaries/system/libgui.a ../../../binaries/system/liblowlevel.a ../../../binaries/system/libmongoose.a -Wl,--end-group -lGL -lSDL2 -lpng -lz -lmozjs38-ps-release -lxml2 -lboost_filesystem -lboost_system -lenet -lcurl -licui18n -licuuc -lsodium -lX11 -lXcursor -lopenal -lvorbisfile -lnvcore -lnvmath -lnvimage -lnvtt -lgloox -lminiupnpc -lrt -ldl

Try adding to yours

-lboost_filesystem -lboost_system

 

Link to comment
Share on other sites

https://github.com/bitcoin/bitcoin/issues/10910

Quote

@brianmcmichael thanks. I fixed it by using the manual built boost with ./configure --with-boost-libdir=/usr/local/lib

https://github.com/openframeworks/openFrameworks/issues/5035

This one reinstalled boost after purging it (It appears he had a conflict between two versions)

https://stackoverflow.com/questions/13467072/c-boost-undefined-reference-to-boostsystemgeneric-category

This one created symbolic links to boost. because it had the wrong name when being installed

Link to comment
Share on other sites

Thanks. That may have helped a little. I removed the standard boost which was 1.57. That eliminated any potential conflict. I then installed 1.68 and that seems to have worked.

>echo -e '#include <boost/version.hpp>\nBOOST_VERSION' | gcc -x c++ -E -
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
# 1 "/usr/local/include/boost/version.hpp" 1 3
# 2 "<stdin>" 2
106800

However, I am not sure where the boost script (b2) installed everything. I don't think I am getting as far because I now get this error:

Linking pyrogenesis
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis] Error 1
make: *** [pyrogenesis] Error 2

I'm guessing I have a path issue somewhere since those '-mt' files are now gone from /usr/include/boost. Is it possible they are no longer needed?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...