Author Topic: Avr-gcc project on x86_64 and gnu/stubs-32.h file  (Read 18731 times)

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Avr-gcc project on x86_64 and gnu/stubs-32.h file
« on: August 09, 2011, 11:32:59 pm »
Hi !

I'm new user of Code::Blocks and i started with avr-gcc project.
My project compile fine in command line (not with Code::Blocks) with my custom Makefile.

I've trying to copy out this Makefile in Code::Blocks but when i compile, i've this error :
Code
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
I've trying with my custom Makefile (By checking « This is a custom Makefile » in Project properties) but i've the same error.

I think that installing the package "glibc-devel.i686" can solve the problem but why Code: Blocks would need this package which compile fine in command line ?

Thanks

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #1 on: August 10, 2011, 02:46:23 pm »
Should your project normally need it?
If yes, check directories.

Else, if you check "use a custom makefile" in C::B's project, do it work?

If yes, there is a problem with the configuration of your project.
I think you can look near included libs, maybe the assistant insert "gnu/stubs-32.h" ?

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #2 on: August 10, 2011, 02:57:45 pm »
Should your project normally need it?
If yes, check directories.
No, because it works outside Code::Blocks

With my custom Makefile, it don't need stubs-64.h either (So my project don't need stubs.h ...)
(I've tried to rename stubs-64.h to stubs-64.h.old and to compile with custom Makefile and it works)

Else, if you check "use a custom makefile" in C::B's project, do it work?
Yes

If yes, there is a problem with the configuration of your project.
I think you can look near included libs, maybe the assistant insert "gnu/stubs-32.h" ?

Here is the cbp file of my project, you can see it have no mention of any stubs header
« Last Edit: August 10, 2011, 03:07:24 pm by Difool »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #3 on: August 10, 2011, 03:32:29 pm »
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F and enable full logging.
Then inspect the commands and try them in a terminal to see, which flag or option causes this behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #4 on: August 10, 2011, 03:49:36 pm »
Ok, it works when I remove the « /usr/include » path in Global Compiler Settings -> GNU AVR GCC Compiler -> Search Directories -> Compiler.

This path wasn't added by me, it's the default config.
Is this path useful for anything ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #5 on: August 10, 2011, 04:22:53 pm »
It's not in the default config of C::B !
I don't have it in my clean "GNU AVR GCC Compiler" settings.

So removing it should be save.

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #6 on: August 10, 2011, 08:58:37 pm »
It's not in the default config of C::B !
I don't have it in my clean "GNU AVR GCC Compiler" settings.

So removing it should be save.

I confirm is it the default config of Code::Blocks. At least on Fedora 15 and x86_64.
I just to test on another machine with a fresh install of this distribution.
Maybe a « wrong » rpm package ...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #7 on: August 10, 2011, 09:05:45 pm »
I don't have it in the defaults. (self compiled on centos)
Could you check if you avr-project-wizard is not doing it wrong?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #8 on: August 10, 2011, 09:07:15 pm »
Could you check if you avr-project-wizard is not doing it wrong?

How ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #9 on: August 10, 2011, 09:19:43 pm »
Choose the wizard -> right click -> edit script
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #10 on: August 10, 2011, 09:32:55 pm »
Choose the wizard -> right click -> edit script
I've seen nothing strange here.

But, here, you can see my ~/.codeblocks/default.conf file.
See at lines 728-732.
« Last Edit: August 10, 2011, 09:39:48 pm by Difool »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #11 on: August 10, 2011, 09:50:05 pm »
Choose the wizard -> right click -> edit script
I've seen nothing strange here.

But, here, you can see my ~/.codeblocks/default.conf file.
See at lines 728-732.
Please close C::B and rename the default.conf.
Than restart C::B, so the configuration is rebuild from scratch and check the "Search directories".

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #12 on: August 10, 2011, 10:03:30 pm »
Please close C::B and rename the default.conf.
Than restart C::B, so the configuration is rebuild from scratch and check the "Search directories".

/usr/include always appear in the search directory

Offline Difool

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #13 on: August 11, 2011, 02:43:24 pm »
I've just to test on another linux distribution (Ubuntu 11.04 x86_64).
And it's have the same problem : the /usr/include path is, by default, in the « Search Directory » for the AVR GCC Compiler.

So the problem is not with Fedora package but with Code::Block default settings

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Avr-gcc project on x86_64 and gnu/stubs-32.h file
« Reply #14 on: August 11, 2011, 03:07:03 pm »
What happens, when you:
1. stop codeblocks
2. delete ~/.codeblocks/default.conf
3. start codeblocks

Do you see the same problem?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]