Hello.
When I compile a c++ source file without project a have a crash, the log only prints "Aborted".
Codeblocks svn 8497 self build with default settings.
Debian Wheezy AMD64 - Kernel 3.2.0-3
gcc 4.7.1
wxwidget 2.8.12
softred:
Have you tried the latest night build provided by Jens?
Does it work?
Can you tell us the revision where it first broke?
Are you sure you've built and installed it correctly. Please try a clean build to make sure you're not mixing files from different revisions.
This build crashes as soon as I go to Settings > Editor...Tested, I do not have the crash. (WinXP).
I'm running Windows 7 Pro 32-bit.
$compiler $options $includes -c $file -o $object
$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs
/bin/sh: -c: command not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
Build log saved as:
file:///tmp/test/test_build_log.html
No macro replacement, looks like broken compiler lookup again.Program received signal SIGSEGV, Segmentation fault.
No macro replacement, looks like broken compiler lookup again.Program received signal SIGSEGV, Segmentation fault.
0x61e5e8b2 in DirectCommands::GetCompileSingleFileCommand (this=0x22ed18,
filename=...)
at C:/Devel/CodeBlocks/src/plugins/compilergcc/directcommands.cpp:342
→→C:\Devel\CodeBlocks\src\plugins\compilergcc\directcommands.cpp:342:11849:beg:0x61e5e8b2
Reproducible... I'll see what I can do.
When I compile a c++ source file without project a have a crash, the log only prints "Aborted".
Just moving the code from line 57 to the beginning of the ctor, works here on linux.Tried, works, and committed. This was an "ooopsi" error when changing the command generation interface for CC.
Can you test it on windows ?
warn.Printf(_("WARNING: Target '%s': Unable to resolve %lu external dependencies:"),
target->GetFullTitle().wx_str(), static_cast<unsigned long>(fileMissing.Count()));
warn.Printf(_("WARNING: Target '%s': Unable to resolve %lu external dependenc%s:"),
target->GetFullTitle().wx_str(), static_cast<unsigned long>(fileMissing.Count()), wxString(fileMissing.Count() == 1 ? _("y") : _("ies")).wx_str());
Small problem for localisation introduced with svn 8499 in directcommand.cpp :OK agreed - I will revert that. Actually it slipped in from the compiler branch.
This build crashes as soon as I go to Settings > Editor...Tested, I do not have the crash. (WinXP).
I'm running Windows 7 Pro 32-bit.
I guess your configure file(default.conf) was broken, can you try to delete the conf file, and try again?
Do you have any crash report? (call stack)This build crashes as soon as I go to Settings > Editor...Tested, I do not have the crash. (WinXP).
I'm running Windows 7 Pro 32-bit.
I guess your configure file(default.conf) was broken, can you try to delete the conf file, and try again?
The 8500 build also craps out on me under Win7. I've removed my AppData\Roaming\CodeBlocks directory as well as removing and re-extracting the complete C::B (to make sure no old files were left around).
[...]During translation, you could translate the first message to the string minus the last terms, and the two suffix strings to (instead be) full word(s). (Alternatively, you could translate the first message to the full string (as previous), and the two suffix strings to empty strings.)
Though it's a nice subtility, i think it's not a so good idea for other localisations than English. So, the old solution, though not perfect, is better.
No macro replacement, looks like broken compiler lookup again.
Speaking of compiler, would it be possible to add support for "no compiler" projects? IWe have a "commands only" target. Does that help?
Speaking of compiler, would it be possible to add support for "no compiler" projects? IWe have a "commands only" target. Does that help?
rickg22: Why don't you modify the empty project template and commit it? Or duplicate it and name it "Empty no compiler project" or something like that?
rickg22: Why don't you modify the empty project template and commit it? Or duplicate it and name it "Empty no compiler project" or something like that?
Because I barely have time :(
I need something like this too for some of the scripted language projects I work on. The other problem with commands only is that it can't be run or debugged. Is there a reason why not?It would probably be best to modify this in the XML Compiler branch, however I am not sure if features should be held off from that branch currently so it can be focused on merging (devs, is there a normal procedure here?).
I'm always forced to "choose" a compiler - and I always end up choosing GCC by default, which obviously I don't have on this machine. I want to be able to choose "No compiler" or something, so that it won't ask me for compiler settings.So creating a dummy "Null Compiler" should suit your purposes?
No merging until the release! ::)Yes, I think we made that point already.
A final thought on the "commands only" target: Does it make any sense for that target to have any of the build option tabs other than the pre/post build steps?Macros (envvars) as well I'd say ()if you want to use them in scripts).
So creating a dummy "Null Compiler" should suit your purposes?Yes - sounds reasonable for these purposes. BTW: all compiler related change sin the branch, please. I'll merge all the latest changes from trunk into the branch in a minute...
I'm always forced to "choose" a compiler - and I always end up choosing GCC by default, which obviously I don't have on this machine. I want to be able to choose "No compiler" or something, so that it won't ask me for compiler settings.So creating a dummy "Null Compiler" should suit your purposes?
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 8543)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -2778,7 +2778,8 @@
{
dlg.SetSize(dlg.GetPosition().x, dlg.GetPosition().y - (220 - dlg.GetSize().GetHeight()) / 2,
dlg.GetSize().GetWidth(), 220);
- } dlg.ShowModal();
+ }
+ dlg.ShowModal();
wxString flags = dlg.GetValue();
flags.Replace(wxT("\n"), wxT(" "));
flags.Replace(wxT("\r"), wxT(" "));
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8543)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -701,6 +701,12 @@
// Get configured masterpath, expand macros and remove trailing separators
wxString masterPath = compiler->GetMasterPath();
+ bool isNoComp = false;
+ if (masterPath == wxT("-- No Compiler --")) // Special case so "No Compiler" is valid
+ {
+ isNoComp = true;
+ masterPath.Clear();
+ }
Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
while ( !masterPath.IsEmpty()
&& ((masterPath.Last() == '\\') || (masterPath.Last() == '/')) )
@@ -757,7 +763,7 @@
/* TODO (jens#1#): Is the above correct ?
Or should we search in the whole systempath (pathList in this case) for the executable? */
// Try again...
- if (binPath.IsEmpty() || (pathList.Index(binPath, caseSens)==wxNOT_FOUND))
+ if ((binPath.IsEmpty() || (pathList.Index(binPath, caseSens)==wxNOT_FOUND)) && !isNoComp)
{
InfoWindow::Display(_("Environment error"),
_("Can't find compiler executable in your configured search path's for ") + compiler->GetName() + _T('\n'));
Index: src/plugins/compilergcc/resources/compilers/options_null.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_null.xml (revision 0)
+++ src/plugins/compilergcc/resources/compilers/options_null.xml (revision 0)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_compiler_options>
+<CodeBlocks_compiler_options>
+ <!-- No options -->
+ <Option name="No active compiler"
+ option="none"
+ checkAgainst="none"
+ checkMessage="This is not a switch; it does nothing."
+ supersedes="none"/>
+</CodeBlocks_compiler_options>
Index: src/plugins/compilergcc/resources/compilers/compiler_null.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/compiler_null.xml (revision 0)
+++ src/plugins/compilergcc/resources/compilers/compiler_null.xml (revision 0)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_compiler>
+<CodeBlocks_compiler name="*No Compiler*"
+ id="null"
+ weight="100">
+ <Path type="master">
+ <Fallback path="-- No Compiler --"/>
+ </Path>
+</CodeBlocks_compiler>
Index: src/plugins/compilergcc/compilerXML.cpp
===================================================================
--- src/plugins/compilergcc/compilerXML.cpp (revision 8543)
+++ src/plugins/compilergcc/compilerXML.cpp (working copy)
@@ -244,8 +244,9 @@
}
wxSetEnv(wxT("PATH"), origPath);
- if (wxFileExists(m_MasterPath + wxFILE_SEP_PATH + wxT("bin") + wxFILE_SEP_PATH + m_Programs.C) ||
- wxFileExists(m_MasterPath + wxFILE_SEP_PATH + m_Programs.C))
+ if ( wxFileExists(m_MasterPath + wxFILE_SEP_PATH + wxT("bin") + wxFILE_SEP_PATH + m_Programs.C)
+ || wxFileExists(m_MasterPath + wxFILE_SEP_PATH + m_Programs.C)
+ || m_MasterPath == wxT("-- No Compiler --")) // Special case so "No Compiler" is valid
{
return adrDetected;
}
Here is a preliminary patch (against the XML Compiler branch);This one doesn't apply for me when copy/pasting it out of here due to invalid characters. Maybe you can attach a patch file to the post, please?
This one doesn't apply for me when copy/pasting it out of here due to invalid characters.??? I wonder where invalid characters would come from ...