www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Compiling Phobos on Linux

reply Juan Jose Comellas <jcomellas gmail.com> writes:
It seems that Phobos does not compile on Linux when using g++ 4.0.x. When
trying to compile it I got these errors in the recls subdirectory:

make -C ./etc/c/recls -f linux.mak
make[1]: Entering directory `/opt/dmd/src/phobos/etc/c/recls'
g++ -Wall  -O4 -march=i686  -DNDEBUG -DUNIX -D_M_IX86 -c -I. -I../stlsoft
-orecls_fileinfo_unix.o recls_fileinfo_unix.cpp
recls_fileinfo_unix.cpp: In function ‘const recls::recls_fileinfo_t*
../stlsoft/stlsoft_null.h:194: error: ‘stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)’ is private
recls_fileinfo_unix.cpp:237: error: within this context
recls_fileinfo_unix.cpp: In function ‘void recls::FileInfo_Release(const
../stlsoft/stlsoft_null.h:194: error: ‘stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)’ is private
recls_fileinfo_unix.cpp:256: error: within this context
recls_fileinfo_unix.cpp: In function ‘recls::recls_rc_t
recls::FileInfo_Copy(const recls::recls_fileinfo_t*, const
../stlsoft/stlsoft_null.h:194: error: ‘stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)’ is private
recls_fileinfo_unix.cpp:277: error: within this context
make[1]: *** [recls_fileinfo_unix.o] Error 1
make[1]: Leaving directory `/opt/dmd/src/phobos/etc/c/recls'
make: *** [etc/c/recls/recls_fileinfo_unix.o] Error 2

I corrected this problem by adding a public empty copy constructor in the
class NULL_v in src/etc/c/stlsoft/stlsoft_null.h. As I'm not using recls,
I'm not sure if this fix is correct. A proper fix would have taken a lot of
time since the stlsoft/recls have way too many defines and is quite hard to

Maybe it's time to remove recls from Phobos...
Mar 28 2006
parent Frank Benoit <frank nix.de> writes:
Mar 29 2006