Code::Blocks Forums

User forums => Help => Topic started by: trebor1718 on February 03, 2019, 09:39:47 pm

Title: gcc fails to build silently in code::blocks
Post by: trebor1718 on February 03, 2019, 09:39:47 pm
Hello,

I have created a new Project from the Template "Console application", Language C and GNU GCC Compiler.
In the new created Project when pressing the Compile Button I get this output in the Build log:

Code
-------------- Build: Debug in RaspiTest (compiler: GNU GCC Compiler)---------------

gcc -Wall -g -fomit-frame-pointer -fexpensive-optimizations -Os  -c /media/daten/AVR/R²/RaspiTest/code/main.c -o obj/Debug/main.o
g++  -o bin/Debug/RaspiTest obj/Debug/main.o  -s 
g++: error: obj/Debug/main.o: Datei oder Verzeichnis nicht gefunden
g++: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

When looking at obj/Debug the file main.o does not exist.
When running the commands manually in the console, everything works as expected though.

I tried with Code::Blocks 17.12 on Debian amd64, as well as with Raspbian on the Raspberry Pi.
Project attached as zip-file.


Thanks for your help.
Best regards
Robert
Title: Re: gcc fails to build silently in code::blocks
Post by: sodev on February 03, 2019, 10:57:56 pm
The directory of the source file contains a non ascii character, CodeBlocks has trouble with these.
Title: Re: gcc fails to build silently in code::blocks
Post by: oBFusCATed on February 03, 2019, 11:58:12 pm
What is the FS of /media/daten?
Having a source file in /tmp/R²/test works fine for me. :(
Title: Re: gcc fails to build silently in code::blocks
Post by: trebor1718 on February 04, 2019, 09:50:01 pm
moving to another path without the ² makes it work indeed, however other projects with avr-gcc or gcc for ARM work perfect in this path.
/media/daten has an xfs file system.
Title: Re: gcc fails to build silently in code::blocks
Post by: stahta01 on February 04, 2019, 10:50:13 pm
moving to another path without the ² makes it work indeed, however other projects with avr-gcc or gcc for ARM work perfect in this path.
/media/daten has an xfs file system.

I am guessing the Compiler is different for these cases, correct?

Could be the compiler is having the problem with the path instead of Code::Blocks.

Tim S.
Title: Re: gcc fails to build silently in code::blocks
Post by: oBFusCATed on February 05, 2019, 12:56:14 am
trebor1718: What happens if you move this R2 folder in another file system? What happens if you try to create this path again?  Can you reproduce this with a simple console project which you can share? What are your locale settings? Have you changed them after you've created the R2 path?
Title: Re: gcc fails to build silently in code::blocks
Post by: trebor1718 on February 05, 2019, 07:51:18 pm
Could be the compiler is having the problem with the path instead of Code::Blocks.

I don't think so: when I run the commands in the same directory in a terminal window, everything works as expected.

trebor1718: What happens if you move this R2 folder in another file system? What happens if you try to create this path again?  Can you reproduce this with a simple console project which you can share? What are your locale settings? Have you changed them after you've created the R2 path?

I tried the same in my home folder (~/src/R²/RaspiTest - ext4 FS), and it also does not work there. The same in another new path on /media/daten including ². Everytime I created a new Project with code::block's "Console Application" template, like the one I attached in my first post.
My Locale LANG is set to de_AT.UTF-8. I did never change that.

Thanks
Robert
Title: Re: gcc fails to build silently in code::blocks
Post by: trebor1718 on February 05, 2019, 08:03:10 pm
Ok, in fact the problem is already solved for me by moving to another path.
Nevertheless, if this problem is of interest for anyone and I can help by trying anything just reply.
Title: Re: gcc fails to build silently in code::blocks
Post by: Miguel Gimenez on February 05, 2019, 08:44:58 pm
Your problem is very similar to the one described here:

https://forums.wxwidgets.org/viewtopic.php?t=43236 (https://forums.wxwidgets.org/viewtopic.php?t=43236)

It happened only in Linux, and is fixed in wxWidgets 3.1.0
Title: Re: gcc fails to build silently in code::blocks
Post by: oBFusCATed on February 05, 2019, 08:49:47 pm
I'm using 3.0.4+gentoos patches and it works fine.

@trebor1718: The problem is of interest. What is your wxwidgets version? The one from the help -> about dialog
Title: Re: gcc fails to build silently in code::blocks
Post by: trebor1718 on February 05, 2019, 08:54:06 pm
it says wx3.0.3
Title: Re: gcc fails to build silently in code::blocks
Post by: Miguel Gimenez on February 05, 2019, 09:02:32 pm
Looking at wxWidgets' commits the relevant change seems the one made on 19-Feb-2016:

https://github.com/wxWidgets/wxWidgets/commit/704055f200d97f327a8ee5212762b41bf1d6d503#diff-5e75d58b03dd94b8366b5f127eea9287 (https://github.com/wxWidgets/wxWidgets/commit/704055f200d97f327a8ee5212762b41bf1d6d503#diff-5e75d58b03dd94b8366b5f127eea9287)

3.1.0 was released ten days later
Title: Re: gcc fails to build silently in code::blocks
Post by: BlueHazzard on February 05, 2019, 11:34:45 pm
non ascii symbols in paths *shudder*