[Gtkradiant] Compile Issue

SmallPileofGibs spog at planetquake.com
Wed Jan 18 16:59:11 CST 2006


Hi,

-DQ_NO_STLPORT is no longer used,as far as I can tell.

> os.system("ln -s `g++ -print-file-name=libstdc++.a`")
This is an experimental hack to force static linking with libstdc++.
It's safe to remove that line.

The m_surfaceFlags and m_contentFlags should be changed to 'int' -
I've changed this in revision 5264.

> build/release/libs/libjpeg6.a(jdapimin.o): relocation R_X86_64_32S
> against `a local symbol' can not be used when making a shared
> object; recompile with -fPIC
This is a bit of a mystery to me. Perhaps removing the -static-libgcc
option would make a difference.

-SPoG


Wednesday, January 18, 2006, 7:08:49 PM, you wrote:

> to: gtkradiant at zerowing.idsoftware.com
> Compile issues with Build 5263

> Hello,

> Tried builds 5257, 5258, and 5263: with x86_64 gcc-3.4.4, glibc-2.3.6.
> Tried 5257 on x86 gcc-3.3.5/3.3.6/3.4.4 glibc-2.3.5 and it mirrored the errors below.

> I've been playing around with it a bit, and hoping someone can
> shed some light on a few things. I still cannot get the entire
> package to compile. I do have the radiant.x86_64 compiling now, but
> I cannot get all of the libs and plugins to play nice with the
> linker. 

> What is: CXXFLAGS: -DQ_NO_STLPORT
> My quick search only revealed references to radiants scons config files.

> -------------------------------------------------------------------------------------

> First Issue:

> Wouldn't progress at all until in SConstruct, line 208:
> os.system("ln -s `g++ -print-file-name=libstdc++.a`") 
> line was commented out. It now will progress.


> Leaving that line above, creates the last issue early. The issue
> is essentially it wants the jpeg6 libs compiled with -fPIC. But
> removing that from SConstruct means we can progress far enough it
> will compile radiant.x86_64, but it refuses to link some of the libs.

> -------------------------------------------------------------------------------------

> Second Issue:
> End of the Compilation log:

> In file included from libs/instancelib.h:9,
>                  from radiant/brushnode.h:5,
>                  from radiant/brushmanip.cpp:8:
> libs/scenelib.h: In member function `bool scene::Node::visible()':
> libs/scenelib.h:233: warning: comparison between signed and unsigned integer expressions
> In file included from radiant/brushnode.h:6,
>                  from radiant/brushmanip.cpp:8:
> radiant/brush.h: In copy constructor `Brush::Brush(const Brush&)':
> radiant/brush.h:1800: warning: base class `class Snappable'
> should be explicitly initialized in the copy constructor
> In file included from radiant/brushnode.h:7,
>                  from radiant/brushmanip.cpp:8:
> radiant/brushtokens.h: In function `bool
> FaceShader_importContentsFlagsValue(FaceShader&, Tokeniser&)':
> radiant/brushtokens.h:12: error: invalid initialization of
> reference of type 'size_t&' from expression of type 'unsigned int'
> libs/stringio.h:285: error: in passing argument 2 of `bool
> Tokeniser_getSize(Tokeniser&, size_t&)'
> radiant/brushtokens.h:13: error: invalid initialization of
> reference of type 'size_t&' from expression of type 'unsigned int'
> libs/stringio.h:285: error: in passing argument 2 of `bool
> Tokeniser_getSize(Tokeniser&, size_t&)'
> libs/math/aabb.h: At global scope:
> libs/math/aabb.h:234: warning: 'aabb_normals' defined but not used
> scons: *** [build/release/radiant/brushmanip.o] Error 1
> scons: building terminated because of errors.


> GCC error'd out on the size_t (long unsigned int) and
> faceShader.m_flags.m_contentFlags (unsigned int). So changing
> faceShader.m_flags.m_contentFlags to a long unsigned int, seems to
> fix the issue. This change does create the next issue that is
> resolved fairly simply, but not sure if there will be other
> "quirks." 

> The size_t in std is a long unsigned int on my system, has this
> changed since early versions of gcc/glibc?

> radiant/brush.h, line 379:
> class ContentsFlagsValue
> {
> public:
>   ContentsFlagsValue()
>   {
>   }
> // Xoalin 12/01/2006 trying a fix, changing to long unsigned ints, instead of unsigned ints
>   ContentsFlagsValue(long unsigned int surfaceFlags, long
> unsigned int contentFlags, int value, bool specified) :
>     m_surfaceFlags(surfaceFlags),
>     m_contentFlags(contentFlags),
>     m_value(value),
>     m_specified(specified)
>   {
>   }
> // Xoalin 12/01/2006 trying a fix, changing to long unsigned ints, instead of unsigned ints
>   long unsigned int m_surfaceFlags;
>   long unsigned int m_contentFlags;
>   int m_value;
>   bool m_specified;
> };

> Doing that gets me past the issue.
> But onto the next issue.

> --------------------------------------------------------------------------------------------------------------------
> Third Issue:
> End of the Compilation log:


> g++ -pipe -DQ_NO_STLPORT -W -Wall -Wcast-align -Wcast-qual
> -Wno-unused-parameter -Wno-non-virtual-dtor -Wreorder -O2
> `pkg-config glib-2.0 --cflags` `xml2-config --cflags` `pkg-config
> gtk+-2.0 --cflags` `pkg-config gtkglext-1.0 --cflags`
> -Ibuild/release/libs -Ilibs -Ibuild/release/include -Iinclude -c -o
> build/release/radiant/brushmanip.o radiant/brushmanip.cpp
> In file included from libs/instancelib.h:9,
>                  from radiant/brushnode.h:5,
>                  from radiant/brushmanip.cpp:8:
> libs/scenelib.h: In member function `bool scene::Node::visible()':
> libs/scenelib.h:233: warning: comparison between signed and unsigned integer expressions
> In file included from radiant/brushnode.h:6,
>                  from radiant/brushmanip.cpp:8:
> radiant/brush.h: In copy constructor `Brush::Brush(const Brush&)':
> radiant/brush.h:1802: warning: base class `class Snappable'
> should be explicitly initialized in the copy constructor
> include/itextstream.h: In function `TextOutputStream&
> operator<<(TextOutputStream&, const T&) [with T = long unsigned
> int]':
> radiant/brushxml.h:207:   instantiated from here
> include/itextstream.h:46: error: call of overloaded
> `ostream_write(TextOutputStream&, const long unsigned int&)' is
> ambiguous
> libs/stream/textstream.h:89: note: candidates are:
> TextOutputStreamType& ostream_write(TextOutputStreamType&, char)
> [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:98: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, double)
> [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:109: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, float)
> [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:117: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, int)
> [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:135: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, Unsigned)
> [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:151: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, const
> char*) [with TextOutputStreamType = TextOutputStream] <near match>
> libs/stream/textstream.h:168: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, const
> HexChar&) [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:263: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, const
> Decimal&) [with TextOutputStreamType = TextOutputStream]
> libs/stream/textstream.h:331: note:                
> TextOutputStreamType& ostream_write(TextOutputStreamType&, const
> LowerCase&) [with TextOutputStreamType = TextOutputStream] <near
> match>
> libs/math/aabb.h: At global scope:
> libs/math/aabb.h:234: warning: 'aabb_normals' defined but not used
> scons: *** [build/release/radiant/brushmanip.o] Error 1
> scons: building terminated because of errors.


> To resolve this issue, redundancy was created with an overloaded
> function that was identical as one of the others except it was
> intended for a long unsigned int, and not an unsigned int. 

> libs/stream/textstream.h, line 132:
> //Xoa 12/01/2006 Function below same as above, except overloaded for long unsigned int
> /// \brief Writes an <long> unsigned integer \p i to \p ostream in decimal form.
> template<typename TextOutputStreamType>
> inline TextOutputStreamType& ostream_write(TextOutputStreamType&
> ostream, const long unsigned int i)
> {
>   const std::size_t bufferSize = 16;
> #if 1
>   char buf[bufferSize];
>   char* begin =
> TextOutputDetail::write_unsigned_decimal_backward(buf + bufferSize,
> i, false);
>   ostream.write(begin, (buf + bufferSize) - begin);
> #else
>   char buf[bufferSize];
>   ostream.write(buf, snprintf(buf, bufferSize, "%u", i));
> #endif
>   return ostream;
> }

> ---------------------------------------------------------------------------------------------
> Fourth Issue:
> End of the Compilation log:

> gcc -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -O2
> -Ibuild/release/libs -Ilibs -c -o build/release/libs/ddslib/ddslib.o
> libs/ddslib/ddslib.c
> ar r build/release/libs/libjpeg6.a
> build/release/libs/jpeg6/jcomapi.o
> build/release/libs/jpeg6/jdcoefct.o
> build/release/libs/jpeg6/jdinput.o
> build/release/libs/jpeg6/jdpostct.o
> build/release/libs/jpeg6/jfdctflt.o
> build/release/libs/jpeg6/jpgload.o
> build/release/libs/jpeg6/jdapimin.o
> build/release/libs/jpeg6/jdcolor.o
> build/release/libs/jpeg6/jdmainct.o
> build/release/libs/jpeg6/jdsample.o
> build/release/libs/jpeg6/jidctflt.o
> build/release/libs/jpeg6/jutils.o
> build/release/libs/jpeg6/jdapistd.o
> build/release/libs/jpeg6/jddctmgr.o
> build/release/libs/jpeg6/jdmarker.o
> build/release/libs/jpeg6/jdtrans.o
> build/release/libs/jpeg6/jmemmgr.o
> build/release/libs/jpeg6/jdatasrc.o
> build/release/libs/jpeg6/jdhuff.o
> build/release/libs/jpeg6/jdmaster.o
> build/release/libs/jpeg6/jerror.o build/release/libs/jpeg6/jmemnobs.o
> ranlib build/release/libs/libjpeg6.a
> ar: creating build/release/libs/libjpeg6.a
> libs/ddslib/ddslib.c: In function `DDSDecompressDXT1':
> libs/ddslib/ddslib.c:526: warning: cast from pointer to integer of different size
> libs/ddslib/ddslib.c:526: warning: cast to pointer from integer of different size
> libs/ddslib/ddslib.c: In function `DDSDecompressDXT3':
> libs/ddslib/ddslib.c:572: warning: cast from pointer to integer of different size
> libs/ddslib/ddslib.c:572: warning: cast to pointer from integer of different size
> libs/ddslib/ddslib.c: In function `DDSDecompressDXT5':
> libs/ddslib/ddslib.c:628: warning: cast from pointer to integer of different size
> libs/ddslib/ddslib.c:628: warning: cast to pointer from integer of different size
> g++ -pipe -DQ_NO_STLPORT -W -Wall -Wcast-align -Wcast-qual
> -Wno-unused-parameter -Wno-non-virtual-dtor -Wreorder -O2
> -fno-exceptions -fno-rtti `libpng-config --cflags` -fPIC
> -Ibuild/release/libs -Ilibs -Ibuild/release/include -Iinclude -c -o
> build/release/plugins/imagepng/plugin.os plugins/imagepng/plugin.cpp
> ar r build/release/libs/libddslib.a
> build/release/libs/ddslib/ddslib.o
> ranlib build/release/libs/libddslib.a
> ar: creating build/release/libs/libddslib.a
> g++ -Wl,-fini,fini_stub -L. -static-libgcc -ldl -shared -o
> build/release/image.so build/release/plugins/image/bmp.os
> build/release/plugins/image/jpeg.os
> build/release/plugins/image/image.os
> build/release/plugins/image/pcx.os
> build/release/plugins/image/tga.os
> build/release/plugins/image/dds.os -Lbuild/release/libs -Llibs
> -ljpeg6 -lddslib
> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
> build/release/libs/libjpeg6.a(jdapimin.o): relocation R_X86_64_32S
> against `a local symbol' can not be used when making a shared
> object; recompile with -fPIC
> build/release/libs/libjpeg6.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> scons: *** [build/release/image.so] Error 1
> scons: building terminated because of errors.


> Now IF we alter the SConscript file to change jpeg6 into a
> SharedLibrarySafe and not StaticLibrary, scons will have it compile
> with -fPIC. However it then wants the ddslibs compiled that way as
> well. Compiling them both that way generates unknown symbol errors.

> Now compiling those two with -fPIC is probably not how this thing
> was designed, since they are not one of the modular plugins. I'm
> just sort of hoping someone has some suggestions on the issue. 

> ------------------------------------------------------------------------------------------------------------------

> If anyone can shed some light on that linking issue, it would be a great help.


> Are you content to merely exist? Or do you truly want to 
> live?

> Trophy hunters can write off canned hunts and big game safaris at taxpayers'
> expense - help end this cruelty loophole: http://go.care2.com/66836

> http://www.Care2.com  Free e-mail. 100MB storage.  Helps nonprofits.

> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant at zerowing.idsoftware.com
> http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant





More information about the Gtkradiant mailing list