[eq-dev] Compile errors in gpusd and equalizer?

17 views
Skip to first unread message

Robert Hauck

unread,
Apr 30, 2013, 5:24:34 AM4/30/13
to eq-...@equalizergraphics.com
Hi all

I tried to compile Equalizer from the Git repo and got 2 errors (so far):

First, gpusd searches for the wrong directory. In
.\CMake\FindLunchbox.cmake, ln 79 it searches in ...share...., but it got
installed in a the directory without share. So I could fix it by replacing
ln 79 with
include("${LUNCHBOX_LIBRARY_DIRS}/../Lunchbox/CMake/options.cmake")

Second, a problem with Boost. I use a static version of Boost (1.53, VS2012
x64), and Equalizer can't link:

lots of
11>5>init.obj : warning LNK4217: locally defined symbol
??1invalid_option_value@program_options@boost@@UEAA@XZ (public: virtual
__cdecl
boost::program_options::invalid_option_value::~invalid_option_value(void))
imported in function
__catch$??$validate@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@D@program_options@boost@@YAXAEAVany@1@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@PEAV34@H@Z$0

and lots of

11>5>init.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class
boost::program_options::options_description_easy_init & __cdecl
boost::program_options::options_description_easy_init::operator()(char const
*,char const *)"
(__imp_??Roptions_description_easy_init@program_options@boost@@QEAAAEAV012@PEBD0@Z)
referenced in function "bool __cdecl eq::_parseArguments(int,char * *)"
(?_parseArguments@eq@@YA_NHPEAPEAD@Z)


I've seen in the CMake files BOOST_PROGRAM_OPTIONS_DYN_LINK gets defined,
maybe this is the problem as it looks for shared boost libraries? I've
defined
Boost_USE_STATIC_LIBS:BOOL=ON
Boost_USE_MULTITHREADED:BOOL=ON
but maybe it gets overwritten?


Furthermore, this error:

Generating D:/CMake_Build/I3D/EXTERNALS/Source/Equalizer/README.rst
11>
11> 4> File "CMake/html2rst.py", line 154
11>
11> 4> self.outtext = u''
11>
11> 4> ^
11>
11> 4> SyntaxError: invalid syntax

Thanks,
Robert



--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Stefan Eilemann

unread,
Apr 30, 2013, 5:50:09 AM4/30/13
to eq-...@equalizergraphics.com
Hi Robert,

On 30. Apr 2013, at 11:24, Robert Hauck [via Software] <ml-node+s171...@n2.nabble.com> wrote:

> I tried to compile Equalizer from the Git repo and got 2 errors (so far):

Which version are you trying to compile? I was trying to reproduce, but gpusd has been replaced/renamed to hwsd.

> First, gpusd searches for the wrong directory. In .\CMake\FindLunchbox.cmake, ln 79 it searches in ...share...., but it got installed in a the directory without share. So I could fix it by replacing ln 79 with
> include("${LUNCHBOX_LIBRARY_DIRS}/../Lunchbox/CMake/options.cmake")

For me (Buildyard master) it is in share: ../../Build/install/share/Lunchbox/CMake/options.cmake

> Second, a problem with Boost. I use a static version of Boost (1.53, VS2012 x64), and Equalizer can't link:

Arg, again the broken boost/windows relationship. They should get counselling.

Afaik you have to find the right combination of defines for static linking - removing BOOST_PROGRAM_OPTIONS_DYN_LINK certainly helps. Maybe some of the Windows users on the list can jump in...


HTH,

Stefan.

>
> lots of
> 11>5>init.obj : warning LNK4217: locally defined symbol ??1invalid_option_value@program_options@boost@@UEAA@XZ (public: virtual __cdecl boost::program_options::invalid_option_value::~invalid_option_value(void)) imported in function __catch$??$validate@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@D@program_options@boost@@YAXAEAVany@1@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@PEAV34@H@Z$0
>
> and lots of
>
> 11>5>init.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::program_options::options_description_easy_init & __cdecl boost::program_options::options_description_easy_init::operator()(char const *,char const *)" (__imp_??Roptions_description_easy_init@program_options@boost@@QEAAAEAV012@PEBD0@Z) referenced in function "bool __cdecl eq::_parseArguments(int,char * *)" (?_parseArguments@eq@@YA_NHPEAPEAD@Z)
>
>
> I've seen in the CMake files BOOST_PROGRAM_OPTIONS_DYN_LINK gets defined, maybe this is the problem as it looks for shared boost libraries? I've defined
> Boost_USE_STATIC_LIBS:BOOL=ON
> Boost_USE_MULTITHREADED:BOOL=ON
> but maybe it gets overwritten?
>
>
> Furthermore, this error:
>
> Generating D:/CMake_Build/I3D/EXTERNALS/Source/Equalizer/README.rst
> 11>
> 11> 4> File "CMake/html2rst.py", line 154
> 11>
> 11> 4> self.outtext = u''
> 11>
> 11> 4> ^
> 11>
> 11> 4> SyntaxError: invalid syntax
>
> Thanks,
> Robert
>
> If you reply to this email, your message will be added to the discussion below:
> http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114.html
> To start a new topic under Equalizer - Parallel Rendering, email ml-node+s1...@n2.nabble.com
> To unsubscribe from Equalizer - Parallel Rendering, click here.
> NAML

--
http://www.eyescale.ch
https://github.com/Eyescale/
http://www.linkedin.com/in/eilemann








--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583115.html

Carsten Rohn

unread,
Apr 30, 2013, 6:23:01 AM4/30/13
to Equalizer Developer List
Robert,

Did you already have a look at the include/boost/config/user.hpp? Maybe you have to disable something there.
It took a while for me to get eq running with boost in windows, but I figured it out - for shared libs.

In case you or someone else is interested: Just add those lines to the user.hpp...

#define BOOST_DATE_TIME_DYN_LINK
#define BOOST_FILESYSTEM_DYN_LINK
#define BOOST_IOSTREAMS_DYN_LINK
#define BOOST_PROGRAM_OPTIONS_DYN_LINK
#define BOOST_PYTHON_DYN_LINK
#define BOOST_REGEX_DYN_LINK
#define BOOST_SIGNALS_DYN_LINK
#define BOOST_SYSTEM_DYN_LINK
#define BOOST_THREAD_DYN_DLL

#define BOOST_SERIALIZATION_NO_LIB

...and manually link to the serialization library in your projects.

Carsten
Realtime Technology Aktiengesellschaft, Munich, Germany

Commercial Registry: 125910; Amtsgericht Muenchen
Board: Ludwig A. Fuchs / Roberto Schettler
Chairman of the Supervisory Board: Prof. Dr. Ulrich Goehner

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender
und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.

Daniel Nachbaur

unread,
Apr 30, 2013, 7:22:23 AM4/30/13
to Equalizer Developer List
Robert,

the _DYN_LINK defines don't work with static boost libs afaik. We decided to go for boost shared lib support, so if you build through Buildyard it works there. I'm just wondering if you need to stick to static boost libs or if you can used shared instead. If static is demanded, we might consider supporting both modes then for Windows?

Cheers,
Daniel


2013/4/30 Carsten Rohn <Carste...@rtt.ag>

Robert Hauck

unread,
May 1, 2013, 6:57:51 AM5/1/13
to eq-...@equalizergraphics.com
Hi Daniel

I don't have to use static libraries, it's only that about 1 day compile
time is required to rebuild all libraries :-) So if it is possible with
minor changes to prevent that, it would be useful, since I guess I'm not the
only person who uses static libs. But no problem if not, it's more or less
fully automated... Maybe you can give me a hint where this ..DYN is defined?
I just saw it in the build files CMake generates, but haven't found it in
the source tree.

@Stefan:
I used all from Github, without Buildyard, as I have my own CMake external
projects...
Haven't seen that it's now hwsd. I'll use that.
But hwsd gives an error in module.cpp, ln 135:

8>D:\CMake_Build\I3D\EXTERNALS\Source\HWSD\hwsd\net\sys\module.cpp(135):
error C2220: warning treated as error - no 'object' file generated
8>
8>D:\CMake_Build\I3D\EXTERNALS\Source\HWSD\hwsd\net\sys\module.cpp(135):
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data

Is there /WX defined?


Cheers,
Robert



--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583119.html

Daniel Nachbaur

unread,
May 1, 2013, 7:47:20 AM5/1/13
to Equalizer Developer List
Robert,

it's defined in CMake/Common.cmake:71 -> add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK).

Wrt hwsd build: which Visual Studio version are you using? The build works fine with 2008 & 2010. And yes, /WX is defined.

Cheers,
Daniel


2013/5/1 Robert Hauck <hu...@bfh.ch>

Robert Hauck

unread,
May 1, 2013, 8:15:55 AM5/1/13
to eq-...@equalizergraphics.com
I use VS 2012. I think this is because VS2012 is pickier than 2010 or 2008...

If I just cast the return value to int, then it compiles successfully...

WideCharToMultiByte( CP_ACP, 0, current->FriendlyName,
(int)wcslen(current->FriendlyName), buf,
BUFSIZ, 0, 0 );

as, WideCharToMultiByte want's an int.

Cheers,
Robert



--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583123.html

Robert Hauck

unread,
May 1, 2013, 9:50:35 AM5/1/13
to eq-...@equalizergraphics.com
Ok, I successfully compiled all libraries.

I had to change the following:

HWSD:
hwsd\net\sys\module.cpp, ln 135, int casting:
WideCharToMultiByte( CP_ACP, 0, current->FriendlyName,
(int)wcslen(current->FriendlyName), buf,
BUFSIZ, 0, 0 );

CMake\common.cmake, ln 71: remove -DBOOST_ALL_DYN_LINK (not sure if needed)

Equalizer:
\eq\client\CMakeLists.txt, ln 18: remove -DBOOST_ALL_DYN_LINK

eq\server\config, ln 771, casting:
for( CompoundsCIter i = children.begin(); i != children.end(); ++i )
(*i)->setSubPixel( SubPixel( i - children.begin(), (const
uint32_t)children.size( )));


With this changes it compiles on VS2012 with static boost libraries.
eqHello is running, so it can't be that wrong...

Hope this helps
Robert




--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583125.html

Stefan Eilemann

unread,
May 15, 2013, 7:54:46 AM5/15/13
to eq-...@equalizergraphics.com
Hi Robert,

On 1. May 2013, at 15:50, Robert Hauck [via Software] <ml-node+s171...@n2.nabble.com> wrote:

> HWSD:

applied.

> CMake\common.cmake, ln 71: remove -DBOOST_ALL_DYN_LINK (not sure if needed)
>
> Equalizer:
> \eq\client\CMakeLists.txt, ln 18: remove -DBOOST_ALL_DYN_LINK

Not applied (yet) - not sure how to generalize this.

> eq\server\config, ln 771, casting:
> for( CompoundsCIter i = children.begin(); i != children.end(); ++i )
> (*i)->setSubPixel( SubPixel( i - children.begin(), (const uint32_t)children.size( )));

I don't find this!?

Cheers,

Stefan.





--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583199.html

Robert Hauck

unread,
May 15, 2013, 8:19:32 AM5/15/13
to eq-...@equalizergraphics.com
Ups, forgot the filename, its in Equalizer,
/eq/server/config/resources.cpp ln 771.

The (const uint32_t) before children.size().

cheers,
Robert



--
View this message in context: http://software.1713.n2.nabble.com/Compile-errors-in-gpusd-and-equalizer-tp7583114p7583200.html
Reply all
Reply to author
Forward
0 new messages