c++.stlsoft - [Pantheios]: 1.0.1-beta3 failed to compile on GNU/Linux with GCC 4.1.1
- Volker Lukas (34/34) Sep 25 2006 Hello,
Hello, I attempted to build Pantheios Version 1.0.1-beta3 on GNU/Linux, using GCC 4.1.1, in conjunction with Stlsoft 1.9.1 beta 24. Building by setting the STLSOFT environment variable, changing into the build/gcc40 subdirectory of the source distribution and entering "make -f makefile.unix" failed due to these problems: 1. When compiling example_cpp_custom_type_1.cpp, a suitable definition of "c_str_len_a(Person const&)" is not found. Exchanging "<" by "<=" in line 29 of that file will make it compile. 2. The compiler does not recognize the option "-Wno-long-double". This option can be removed from the compiler command line by changing the lines 99 and 107 of the Makefile. 3. The compiler does not find the stlsoft/stlsoft.h header. This problem can be removed by changing the definition of the CC_INCLUDES and CPPC_INCLUDES variables in the makefile by replacing <<-I"$(STLSOFT)/include">> with <<-I"$(STLSOFT)">> in lines 55 and 65 in the Makefile. 4. The linker complains about undefined Pthread functions. This can be solved by adding adding "-lpthread" to the definition of the LD_ARGS_ST_DEBUG and LD_ARGS_ST_RELEASE variables in lines 165 and 166 in the Makefile. 5. The linker complains about undefined references to pantheios_getSeverityString and pantheios_util_getCurrentTime while compiling the examples and test programs. This can be resolved by additionally placing the Pantheios core library at the end of the list of link-libraries (Example: In the Makefile, insert a new line containing "$(LIB_CORE_ST_DEBUG)\" immediately after line 1497). 6. The linker complains about missing advapi32 and user32 libraries. Removing these libraries from the definition of LIBS_3PTY_FPRINTF and LIBS_3PTY_SYSLOG variables in the Makefile will rectify this. This relates to lines 210 and 211 in the Makefile. I have attached a patch which contains changes to the gcc40 Makefile according to the points above. Maybe it will save other users a few minutes of time. In the subdirectory build/gcc40 the patch can be applied with "patch -p 3 -i gcc40.diff".
Sep 25 2006
Volker First, let me say a big Thanks!, as you've fixed a problem that's been bugging me for ages.I attempted to build Pantheios Version 1.0.1-beta3 on GNU/Linux, using GCC 4.1.1, in conjunction with Stlsoft 1.9.1 beta 24. Building by setting the STLSOFT environment variable, changing into the build/gcc40 subdirectory of the source distribution and entering "make -f makefile.unix" failed due to these problems: 1. When compiling example_cpp_custom_type_1.cpp, a suitable definition of "c_str_len_a(Person const&)" is not found. Exchanging "<" by "<=" in line 29 of that file will make it compile.I've changed this. I don't know why GCC's name lookup is broken, and why it's not broken on Mac OS-X, but at least the problem has a known pathology. The reason for it being <4 and not <=4 is that my Linux box has 3.2 and my Mac 4.0. I assumed that all 4s were "fixed", but it must only be the Mac OS-X version. Very strange, though.2. The compiler does not recognize the option "-Wno-long-double". This option can be removed from the compiler command line by changing the lines 99 and 107 of the Makefile.Fixed. Thanks. Again, this must be a Mac OS-X specific option.3. The compiler does not find the stlsoft/stlsoft.h header. This problem can be removed by changing the definition of the CC_INCLUDES and CPPC_INCLUDES variables in the makefile by replacing <<-I"$(STLSOFT)/include">> with <<-I"$(STLSOFT)">> in lines 55 and 65 in the Makefile.The problem here is that you need a structure similar to the following: /opensrc/stlsoft /opensrc/stlsoft/include <= this is where the beta unzips into Another new (to Pantheios) user has reported the same problem. I think the answer is to preserve the "include" directory in the beta zips, and then the confusion should go away.4. The linker complains about undefined Pthread functions. This can be solved by adding adding "-lpthread" to the definition of the LD_ARGS_ST_DEBUG and LD_ARGS_ST_RELEASE variables in lines 165 and 166 in the Makefile.Fixed. Thanks.5. The linker complains about undefined references to pantheios_getSeverityString and pantheios_util_getCurrentTime while compiling the examples and test programs. This can be resolved by additionally placing the Pantheios core library at the end of the list of link-libraries (Example: In the Makefile, insert a new line containing "$(LIB_CORE_ST_DEBUG)\" immediately after line 1497).Brilliant! This has bugged me every time I've come up against it. :-) I never thought to mention the core library twice, but that fixes it, and it works fine on Mac, Linux and Win32. (There's a runtime error in the SysLog test program, which indicates a problem with SysLog initialisation. I'll get to this at a later time.)6. The linker complains about missing advapi32 and user32 libraries. Removing these libraries from the definition of LIBS_3PTY_FPRINTF and LIBS_3PTY_SYSLOG variables in the Makefile will rectify this. This relates to lines 210 and 211 in the Makefile.Fixed. Thanks.I have attached a patch which contains changes to the gcc40 Makefile according to the points above. Maybe it will save other users a few minutes of time. In the subdirectory build/gcc40 the patch can be applied with "patch -p 3 -i gcc40.diff".I'll release another beta with all these changes in very soon. Thanks again Matthew -- Matthew Wilson Director, Synesis Software (www.synesis.com.au) Author: "Breaking up the Monolith", Addison-Wesley, 2007 (http://www.breakingupthemonolith.com) Author: "Extended STL", Addison-Wesley, 2007 (http://www.extendedstl.com) Author: "Imperfect C++", Addison-Wesley, 2004 (http://www.imperfectcplusplus.com)
Sep 25 2006
I've now put up a patch in the Patches section. (This is my first ever SourceForge patch, though, so no guarantees ... <g>)
Sep 25 2006