make -e

General questions regarding the usage of CodeLite
jargill
CodeLite Curious
Posts: 8
Joined: Thu Sep 13, 2012 11:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

make -e

Post by jargill »

I had been using Codelite on Ubuntu 11.10 and everything worked great. When I updated to 4.1, I ran into a few problems though.

1. The 4.1 binary does not work on 11.10. So I had to build from source. Not that big of a deal.

2. When I tried compiling my existing project, I got a ton of warnings saying: "jobserver unavailable". It took me a while, but I found the "No. of concurrent jobs" setting and switched it to '1'. I don't really understand why '1' wasn't the default. That seems like an advanced setting that I would want to manually turn on myself.

3. The big issue was that when I tried to build my project, it would stop at the first warning and not continue building. I'm using a custom makefile, and if I tried to build it manually in a console it worked fine. I finally noticed in the Output window that Codelite adds a "-e" option to the make command. But I could not find any option in the Settings to turn that off. I eventually had to search the source code and remove it and then rebuild Codelite. After that, my build completed successfully.

It does not seem like a good idea to force build options on users. I should be able to get the exact same results whether I build on the command-line or in Codelite, right?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by eranif »

jargill wrote:When I tried compiling my existing project, I got a ton of warnings saying: "jobserver unavailable"
This means that your 'make' is pretty old. BTW, -jN was the default from day one. Something else was changed - you might consider upgrading your 'make', disabling the -jN only slows the compilation time
jargill wrote:The 4.1 binary does not work on 11.10. So I had to build from source. Not that big of a deal.
You should pick another binary from SF, the one with "oneiric" in its name. By default codelite will suggest the 12.04 binary
jargill wrote:I finally noticed in the Output window that Codelite adds a "-e" option to the make
'make -e' means: force environment variable over makefile variables (this makes sure that CXX set as an environment variable will override the default value set in the makefile). BUT (and this is a big BUT), codelite only adds it
when executing the makefile codelite itself generated NOT a custom makefile.
jargill wrote: I finally noticed in the Output window that Codelite adds a "-e" option to the make command
This should not happen... are you sure you are using custom makefiles for your project ?
codelite does not add '-e' to custom makefiles, only to makefile it generates.

For custom makefiles, codelite simply executes the command specified under: "project settings -> customize -> Custom Build -> Build" nothing more nothing less

Eran
Make sure you have read the HOW TO POST thread
jargill
CodeLite Curious
Posts: 8
Joined: Thu Sep 13, 2012 11:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by jargill »

I'm glad to hear that it is not SUPPOSED to add that '-e'. I am positive that I am using a custom build. In the Project Settings, under Customize->Custom Build, I have the "Enable custom build" checkbox checked, and my build command in the table below.

Actually, I noticed that my debug configuration builds correctly, using my custom command, but my release configuration does not obey my custom commands. Very weird. This all worked fine in the previous version of Codelite.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by eranif »

jargill wrote:Actually, I noticed that my debug configuration builds correctly, using my custom command, but my release configuration does not obey my custom commands. Very weird. This all worked fine in the previous version of Codelite.
can you confirm that *both* your Release and Debug configurations are using 'Custom Build' ?

Eran
Make sure you have read the HOW TO POST thread
jargill
CodeLite Curious
Posts: 8
Joined: Thu Sep 13, 2012 11:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by jargill »

Yes, I can positively confirm that. As I said, this is a project that was set up on a previous version of Codelite and it's been working great in both debug and release modes until now.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by eranif »

Can you please post here both the build output of *both* build configurations? (Release and Debug)
Also, is it possible to get the .project file? (as an attachment)

Eran
Make sure you have read the HOW TO POST thread
jargill
CodeLite Curious
Posts: 8
Joined: Thu Sep 13, 2012 11:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by jargill »

I'll just post the beginning of the build output, since that's all you need to see the problem.

Debug mode is correct. This shows my custom build command:

Code: Select all

----------Build Started--------
MESSAGE: Entering directory `/home/jgill/*****/'
/bin/sh -c 'make ntouch_x86 SIP_MODE=debug'
Release mode is incorrect. This is just supposed to say "make ntouch".

Code: Select all

----------Build Started--------
MESSAGE: Entering directory `/home/jgill/*****/'
/bin/sh -c '"make"  -j 1 -f "ntouch.mk"'
I tried attaching the .project file, but your forum rejected it with the message "The extension project is not allowed." So instead, I'll just cut and paste the relevant section:

Code: Select all

    <Configuration Name="Release (hardware)" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="" C_Options="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="-O2" Required="yes"/>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
      <Environment EnvVarSetName="Default" DbgSetName="Default">
        <![CDATA[]]>
      </Environment>
      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
        <PostConnectCommands/>
        <StartupCommands/>
      </Debugger>
      <PreBuild/>
      <PostBuild>
        <Command Enabled="yes">cp /home/jgill/*****/Build/ntouch/release/* /tftpboot</Command>
        <Command Enabled="yes">cp /home/jgill/*****/Build/ntouch/release/* /home/jgill/ftp</Command>
      </PostBuild>
      <CustomBuild Enabled="yes">
        <RebuildCommand/>
        <CleanCommand>make ntouch_clean</CleanCommand>
        <BuildCommand>make ntouch</BuildCommand>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
        <ThirdPartyToolName>None</ThirdPartyToolName>
        <WorkingDirectory>/home/jgill/*****/</WorkingDirectory>
      </CustomBuild>
      <AdditionalRules>
        <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
      <Completion EnableCpp11="no">
        <ClangCmpFlagsC/>
        <ClangCmpFlags/>
        <ClangPP/>
        <SearchPaths/>
      </Completion>
    </Configuration>
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by eranif »

Ok, my guess is that your "workspace" "Release" configuration is not attached to the "Release" configuration of the project

To make sure that it does, open:
Build -> Configuration Manager

Then:

Select from the top drop-down control (the one that says: "Workspace configuraion") the "Release" configuration
The "Available project configurations" should be updated and display which project build configurations are selected when the "Release" workspace configuration is selected.
Make sure that the correct project build configuration is displayed, if not change it and click Apply

Note, when you switch to "Release" configuration using the little drop down control at the top of the 'Workspace View' you actually set the 'Workspace configuration' and the project configuration.

here are some additional info from the our wiki:

http://www.codelite.org/LiteEditor/ConfigurationManager

Eran
Make sure you have read the HOW TO POST thread
jargill
CodeLite Curious
Posts: 8
Joined: Thu Sep 13, 2012 11:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by jargill »

No, that's not the problem. I did check that, and my Workspace configurations match up correctly with my Project configurations.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: make -e

Post by eranif »

I will need a small reproduction as I am unable to reproduce it here
Make sure you have read the HOW TO POST thread
Post Reply