Author Topic: error 7! when linking  (Read 6530 times)

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
error 7! when linking
« on: July 23, 2012, 05:11:25 pm »
Hi,

I am building a rather large project >60Mb. It seems that CodeBlocks is crashing when I am linking. Here is my system:
1. Linux Debian Squeeze 64 bit (I keep it to the latest patches).
2. CodeSourcery Compiler -> version gcc/g++ 4.5.1
3. CodeBlocks July 20 2012, wx 2.8.12 (Linux unicode) - 64 bit -- svn 8510 SDK version 1.13.5

When I am linking, I get an error code of 7 (failed with error code 7!).

How can I turn on a more verbose debugging for more info?

Z

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error 7! when linking
« Reply #1 on: July 23, 2012, 05:40:52 pm »
Does C::B ("just" the IDE) itself crash or the linker ?

If it's the linker, you have to find out which option gives you more meaningful output and/or read the manual to find out what a return value of 7 means.

I assume you have turned on full commandline logging already, if not: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #2 on: July 23, 2012, 06:11:13 pm »
Hi,

CodeBlocks does not crash (sorry for the misleading statement). I can repeatedly rebuild and get the same error.

I did forget one detail. I can build the app from the commandline without an error (sorry). I am guessing that maybe the redirect from g++ is causing some issue, or the text box can't handle the amount of data (Just a guess).

Z

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error 7! when linking
« Reply #3 on: July 23, 2012, 08:34:36 pm »
I did forget one detail. I can build the app from the commandline without an error (sorry).

Did you build with full commandline logging turned on ?
Does building from console succeed with the same commandline as C::B creates ?

Is your toolchain set up correctly, so C::B uses the same compiler and li nker than you se from commandline ?
Note: C::B puts the compilers masterpath at the top of the searchpath while compiling/linking.

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #4 on: July 23, 2012, 08:43:21 pm »

Hi,

I am asking how to turn on the logging/debugging for the CodeBlocks, so I can provide more info.

We are using a cbp2make utility to convert our cbp file to a makefile. I do believe that it is the same. This error code 7 only started to occur when we moved to the codesourcery compiler.

I have specified the Toolchain and path in the Compiler settings options under Settings.

Z



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error 7! when linking
« Reply #5 on: July 23, 2012, 11:36:13 pm »

Hi,

I am asking how to turn on the logging/debugging for the CodeBlocks, so I can provide more info.

We are using a cbp2make utility to convert our cbp file to a makefile. I do believe that it is the same. This error code 7 only started to occur when we moved to the codesourcery compiler.

I have specified the Toolchain and path in the Compiler settings options under Settings.

Z



It's described in the link I gave you:
I assume you have turned on full commandline logging already, if not: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #6 on: July 24, 2012, 03:47:32 am »

Sorry, I didn't notice this link. I will enable it tomorrow and post the log.

Z

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #7 on: August 09, 2012, 03:25:23 pm »
Sry, it took so ling to get back. My companies priorities are like the wind.

I have one more data point. I am running Debian Squeeze 64 bit. My colleagues are running Debian squeeze 32 bit build 7780, and It does not get the "error 7" when linking.

I do have full command-line option checked. Is there any more logging/debugging that I can enable?

Z

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #8 on: August 22, 2012, 11:09:40 pm »
*,

error 7! (E2BIG) is "errno 7 is E2BIG : The total number of bytes in the environment (envp) and argument list (argv) is too large".

Is there a way to extend the shell limit for codeblocks?

Rob

Offline Zorroslade

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: error 7! when linking
« Reply #9 on: August 27, 2012, 04:00:27 pm »

Is there a way to split the output up into smaller chunks in order to get around this?

I am willing to look into this myself if someone could give me a link to get the code. I do not work with svn or git much so a tar.bz2, instructions for a novice would help, or a link. I can ask questions in that thread/link if I need further help.

Z

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: error 7! when linking
« Reply #10 on: August 28, 2012, 06:56:26 am »
I am willing to look into this myself if someone could give me a link to get the code.
You really should use SVN here. It is very simple: All you need are the SVN tools available for all platforms and then its a one liner:
svn checkout http://svn.berlios.de/codeblocks/trunk

Alternatively this provides you with the whole dump of the repo:
http://download.berlios.de/svndumps/codeblocks-svnroot.tar.gz
...but I don't think this is very helpful.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ