Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Linux compile fails
Linux compile fails [message #1230] Fri, 24 February 2006 10:19 Go to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
After editing the Makefile to give names (as mentioned in the readme) it compiled everything but then died on the final link.
It was trying to write the output to /src/ide I believe. (no such directory on my system).
I changed it to bin/TheIde and let er rip.
It then came back with
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: ./bin/ide/GCC32-Gcc-Gui-Linux-Main-Shared/SelectPkg.o(.gnu.linkonce.r._ZTV14CallbackAction+0x8): unresolvable relocation against symbol `__cxa_pure_virtual@@CXXABI_1.3'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
distcc[23448] ERROR: compile (null) on localhost failed
make: *** [bin/Theide] Error 1


I'm not sure what to do with that.

I'm compiling using Linux
gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/specs
Configured with: /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.5 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)

[Updated on: Fri, 24 February 2006 10:22]

Report message to a moderator

Re: Linux compile fails [message #1232 is a reply to message #1230] Fri, 24 February 2006 10:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Please, try to remove

-ffunction-sections

from the

CC = c++ -c -O2 -Os -ffunction-sections

line.

Mirek

P.S.: I am sorry for linux troubles - we are seeking for capable Linux maintainer/releaser for years now...
Re: Linux compile fails [message #1235 is a reply to message #1232] Fri, 24 February 2006 11:01 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
luzr wrote on Fri, 24 February 2006 04:50

Please, try to remove

-ffunction-sections

from the

CC = c++ -c -O2 -Os -ffunction-sections

line.

Mirek

P.S.: I am sorry for linux troubles - we are seeking for capable Linux maintainer/releaser for years now...


I've not seen -ffunction-sections before. What does it do?

As far as Linux I might be able to give you a hand. Let me get more familiar with your system first though. After I get this up and running I'm going to try to make a autoconf make system for it. (If nothing else it will refresh my skills).

Re: Linux compile fails [message #1236 is a reply to message #1235] Fri, 24 February 2006 11:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
iplayfast wrote on Fri, 24 February 2006 05:01

luzr wrote on Fri, 24 February 2006 04:50

Please, try to remove

-ffunction-sections

from the

CC = c++ -c -O2 -Os -ffunction-sections

line.

Mirek

P.S.: I am sorry for linux troubles - we are seeking for capable Linux maintainer/releaser for years now...


I've not seen -ffunction-sections before. What does it do?

As far as Linux I might be able to give you a hand. Let me get more familiar with your system first though. After I get this up and running I'm going to try to make a autoconf make system for it. (If nothing else it will refresh my skills).




Well, -ffunction-sections is a flag for compiler that puts each function into separate section. This makes dead-code removal possible for the linker.

However, it unfortunately turns out that "ld" does not do removal anyway, and some ld versions react with the error message you have encountered (meanwhile, our own MinGW ld replacement "uld" is able to use this).

I have already encountered the error in ubuntu a "-ffunction-sections" is now removed from TheIDE GCC builder in Linux, but it looks like it somehow survived in makefile generator...

When thinking about autoconf etc, please keep always keep in mind the "synthetic" nature of Makefile. OTOH, if something is needed to be added to Makefile generator, we will be happy to do so.

Also, the whole linux distribution structure is open to discussion. What we have now is what we were able to put together with our limited resources...

Mirek
Re: Linux compile fails [message #1241 is a reply to message #1236] Fri, 24 February 2006 17:57 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
the -ffunction-sections remove made no difference.
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: ./bin/ide/GCC32-Gcc-Gui-Linux-Main-Shared/SelectPkg.o(.gnu.linkonce.r._ZTV14CallbackAction+0x8): unresolvable relocation against symbol `__cxa_pure_virtual@@CXXABI_1.3'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
distcc[11168] ERROR: compile (null) on localhost failed
make: *** [bin/Theide] Error 1

although it appears to be a problem with linking against my library.

I'll play with it a bit and see what I can come up with.

As far as something added to the Makefile generator, how about clean?

I use gentoo so I rarely deal with rpm's or any of that other stuff. I always compile from source. I'll see how this goes before I commit. (I have a bad habit of not finishing things that I start, and I don't want to make a false promise).


Re: Linux compile fails [message #1243 is a reply to message #1241] Fri, 24 February 2006 18:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
iplayfast wrote on Fri, 24 February 2006 11:57

the -ffunction-sections remove made no difference.
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: ./bin/ide/GCC32-Gcc-Gui-Linux-Main-Shared/SelectPkg.o(.gnu.linkonce.r._ZTV14CallbackAction+0x8): unresolvable relocation against symbol `__cxa_pure_virtual@@CXXABI_1.3'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
distcc[11168] ERROR: compile (null) on localhost failed
make: *** [bin/Theide] Error 1

although it appears to be a problem with linking against my library.

I'll play with it a bit and see what I can come up with.

As far as something added to the Makefile generator, how about clean?

I use gentoo so I rarely deal with rpm's or any of that other stuff. I always compile from source. I'll see how this goes before I commit. (I have a bad habit of not finishing things that I start, and I don't want to make a false promise).





I have to aplogize, while checking the Makefile generation, I have encountered another sections related option, this time for the linker:

--gc-sections

I have already removed that from the Makefile generator, please whether it helps for gentoo...

Mirek
Re: Linux compile fails [message #1249 is a reply to message #1230] Fri, 24 February 2006 19:00 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
Yes that got it.
Now it starts and asks for creating user copies of various things. When I click ok it says upp directory not found. It doesn't seem to matter where I start the program.

Normally you would do something like
make
sudo make install

which would install the files in the appropriate place in the Linux system.

Ok I see my mistake. Reading the readme helps Rolling Eyes

It looks like I've got a working system.
I'm going to work on an autoconf scheme to do what you've done so it will
1. Use the local compile flags (Your flags looked pretty generic so I assume this is ok, let me know if it's not).
2. Be easily maintained. (This usually is just a matter of adding new files to configure.in)
3. Automagically install stuff
4. Make an ebuild for gentoo so you will have all the Gentoo Linux users using your software. (Ok, probably just some of them)

Let me know if there are any problems with what I propose, if not I'll work on it over the weekend.
Re: Linux compile fails [message #1250 is a reply to message #1249] Fri, 24 February 2006 19:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
iplayfast wrote on Fri, 24 February 2006 13:00


It looks like I've got a working system.
I'm going to work on an autoconf scheme to do what you've done so it will
1. Use the local compile flags (Your flags looked pretty generic so I assume this is ok, let me know if it's not).
2. Be easily maintained. (This usually is just a matter of adding new files to configure.in)
3. Automagically install stuff
4. Make an ebuild for gentoo so you will have all the Gentoo Linux users using your software. (Ok, probably just some of them)

Let me know if there are any problems with what I propose, if not I'll work on it over the weekend.



Well, you must be all the time aware of one thing: Makefiles are NOT used during development process, they are supplied just as last moment fix.

That mostly means that manual maintainace of source files list is not an option. If there is some other file than Makefile needed to be mainained, we should rather add new feature into TheIDE.

Frankly, avoiding makefiles was one of design goals Smile

Mirek
Re: Linux compile fails [message #1252 is a reply to message #1250] Fri, 24 February 2006 19:28 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
I can see that avoiding makefiles was a design goal. However if you want this system to be used, ya gotta have it for the initial build.

BTW, why? Make is a good thing. It speeds up the build by not rebuilding things that are not out of date, it can be used across multiple processors and computers (check out distcc) and is a very fast process. You guys are doing some amazing work, but this to me looks like re-inventing the wheel.
Re: Linux compile fails [message #1255 is a reply to message #1252] Fri, 24 February 2006 20:33 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Quote:

but this to me looks like re-inventing the wheel.

Try using TheIDE for one or two weeks for professional development.
And after it switch back to your conventional environment with make.
You will find that conventional model unusably slow.
Using U++'s build environment is viery addictive Smile
I started using upp about 2 monts ago, but I can not imagine going back to make or scons world.
Re: Linux compile fails [message #1256 is a reply to message #1252] Fri, 24 February 2006 20:38 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
read this topic:
How BLITZ works?
http://www.arilect.com/upp/forum/index.php?t=msg&th=214& amp; amp;start=0&

[Updated on: Thu, 04 May 2006 15:34] by Moderator

Report message to a moderator

Re: Linux compile fails [message #1257 is a reply to message #1255] Fri, 24 February 2006 21:31 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

zsolt wrote on Fri, 24 February 2006 14:33

Quote:

but this to me looks like re-inventing the wheel.

Try using TheIDE for one or two weeks for professional development.
And after it switch back to your conventional environment with make.
You will find that conventional model unusably slow.
Using U++'s build environment is viery addictive Smile
I started using upp about 2 monts ago, but I can not imagine going back to make or scons world.


I wouldn't say that better!
Re: Linux compile fails [message #1258 is a reply to message #1256] Fri, 24 February 2006 21:34 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
Thanks that was helpful. I kept seeing blitz and assumed it was blitz++ which although cool, seemed like overkill. (Blitz++ is a high performance math library).

As far as blitz being faster, so far I've not seen that. It appears to recompile the world for any change at all.
For example in the sdl example http://www.arilect.com/upp/forum/index.php?t=msg&th=339& amp;start=0&S=5a7812b809c46c7d841b43292b2ab0c8
I changed include <SDL.h> to <SDL/SDL.h> and it recompiled not only the example but the (I guess) blitz file as well.

In the scribble example it compiles 9 sets of files. The sets include CtrlLib,CtrlCore,RichText and all these other libraries. Why is it doing that?

Maybe this is a Linux Windows difference. It seems much more responsive on Windows then Linux.

Also not to be argumentitive, but this functionality is already present in Linux. It's made up of several tools.

  • makedepend figures out what files depend on what
  • ccache will cache compiles that have been previously done
  • gcc will compile several files at a time
  • make will compile using several processors or computers at a time, and will only compile files that have changed.


What Ultimate has done is very neat, and useful, but on Linux it is redundant. (But I'm glad to see it in Windows!)
Re: Linux compile fails [message #1259 is a reply to message #1258] Fri, 24 February 2006 21:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, BLITZ is very different system. Please read the explanation again:) OTOH, BLITZ needs to know more about what he compiles than makefiles are able to provide (it is C++ specific, goes through files, checks things and even generates some stub C++ code).

For full debug mode rebuild, BLITZ can be as much as 4 times faster .

The reason why it seem slow at first is that because of BLITZ, we can avoid traditional system of compiled libraries - in U++, all libraries exist in source form only. If you compile any example for the first time, complete "U++ library" gets recompiled on the way (and gets cached).

Mirek
Re: Linux compile fails [message #1262 is a reply to message #1259] Fri, 24 February 2006 21:52 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
luzr wrote on Fri, 24 February 2006 15:48

Well, BLITZ is very different system. Please read the explanation again:) OTOH, BLITZ needs to know more about what he compiles than makefiles are able to provide (it is C++ specific, goes through files, checks things and even generates some stub C++ code).

For full debug mode rebuild, BLITZ can be as much as 4 times faster .

The reason why it seem slow at first is that because of BLITZ, we can avoid traditional system of compiled libraries - in U++, all libraries exist in source form only. If you compile any example for the first time, complete "U++ library" gets recompiled on the way (and gets cached).

Mirek




Well I'll not argue the point since we both agree it is cool. However perhaps you can help with a bug. In Linux the sdlexample won't link the sdl library. How do I tell it to?
Re: Linux compile fails [message #1263 is a reply to message #1262] Fri, 24 February 2006 21:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
iplayfast wrote on Fri, 24 February 2006 15:52

luzr wrote on Fri, 24 February 2006 15:48

Well, BLITZ is very different system. Please read the explanation again:) OTOH, BLITZ needs to know more about what he compiles than makefiles are able to provide (it is C++ specific, goes through files, checks things and even generates some stub C++ code).

For full debug mode rebuild, BLITZ can be as much as 4 times faster .

The reason why it seem slow at first is that because of BLITZ, we can avoid traditional system of compiled libraries - in U++, all libraries exist in source form only. If you compile any example for the first time, complete "U++ library" gets recompiled on the way (and gets cached).

Mirek




Well I'll not argue the point since we both agree it is cool. However perhaps you can help with a bug. In Linux the sdlexample won't link the sdl library. How do I tell it to?


In Package organizer. (Project/Package organizer).

BTW, we have not tested SDL in linux yet (In fact, SDL is not a part of U++, we have added it to Win32 version just to make things easy for people interested in game development and not necessarily interested in U++ library). I would welcome fix there - the simplest would be to post here fixed .upp and .cpp files of SDLExample package.

Mirek
Re: Linux compile fails [message #1267 is a reply to message #1263] Fri, 24 February 2006 22:32 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
luzr wrote on Fri, 24 February 2006 15:57


BTW, we have not tested SDL in linux yet (In fact, SDL is not a part of U++, we have added it to Win32 version just to make things easy for people interested in game development and not necessarily interested in U++ library). I would welcome fix there - the simplest would be to post here fixed .upp and .cpp files of SDLExample package.

Mirek




OK here you go. (it works!!!)
The font.bmp needed a path change, which may not be portable back to windows.
Re: Linux compile fails [message #1268 is a reply to message #1267] Fri, 24 February 2006 22:34 Go to previous messageGo to next message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
It didn't get the cpp file.
  • Attachment: main.cpp
    (Size: 7.11KB, Downloaded 1661 times)
Re: Linux compile fails [message #1675 is a reply to message #1267] Mon, 13 March 2006 17:51 Go to previous messageGo to next message
wilho is currently offline  wilho
Messages: 19
Registered: February 2006
Promising Member
Linking errors with version bundled with 603-dev1

----- Core ( MSC71 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (1 / 2)
----- SDLExample ( MAIN MSC71 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (2 / 2)
Linking...
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE>@ABV0@@Z) already defined
in LIBCD.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0>@AB
V0@@Z) already defined in LIBCD.lib(typinfo.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strrchr already defined in LIBCD.lib(strrchr.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\upp\out\MSC71.Debug_full\SDLExample.exe : fatal error LNK1169: one or more multiply defined symbols found

There were errors. (0:08.39)
Re: Linux compile fails [message #1680 is a reply to message #1675] Mon, 13 March 2006 19:28 Go to previous messageGo to previous message
iplayfast is currently offline  iplayfast
Messages: 47
Registered: February 2006
Member
It looks to me like you are working in Windows with the Linux source. Better to use the windows source.
Previous Topic: Can't run newly compiled helloworld.o (New User)
Next Topic: problem debugging theIde with theIde in Linux [BUG?]
Goto Forum:
  


Current Time: Sat Apr 27 17:58:37 CEST 2024

Total time taken to generate the page: 0.03369 seconds