Author Topic: Compile error: GCC don't find a file on include directory  (Read 6271 times)

Offline RRomano001

  • Single posting newcomer
  • *
  • Posts: 9
Compile error: GCC don't find a file on include directory
« on: November 17, 2019, 06:24:59 pm »
 Hi, I am new to this forum and I am grate to all can help me.
 I am not new to C:B I was using for a long time on various platform, I am more Linux Unix Embedded oriented.
 Project was fine on Linux Mint 17.3 and previous releases.
 Now I upgraded to Linux Mint 19.2 and I am no more able to compile project on this platform.
 This project is a large one, part are shared between AMD64 architecture, embedded, FPGA code and Raspberry.
 All is fine than when I transferred to mint 19.2 Allegro Library is no more found and compiler fail.
 Library, Build essential and compiler are fine, just a strange behavior is observed on IDE, launching compiler from command line produce object.
 After browsing all option I never find issue related to search.
 allegro.h is on same /usr/include where is stdio.h IDE open stdio.h but not allegro.h.
 Hitting file open, when pointing to /usr/include file list appear scrambled and file are not in sync.
 Before filing a bug ticked I am grate if someone help me pinpoint issue.
 On attach two screenshot of IDE, and comparison of files from editor.
 Thank in advance.
 Roberto

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1644

Offline RRomano001

  • Single posting newcomer
  • *
  • Posts: 9
Re: Compile error: GCC don't find a file on include directory
« Reply #2 on: November 17, 2019, 07:00:51 pm »
Miguel Gimenez thank for prompt answer, I can publish full rebuild log if can be of some help, but remember project is untouched, was error free on last platform linux mint 17.3 AMD64, Raspberry (not cross compiled) compile as is.
 Command line compile offending code hassle free also on offending platform.
 Code::Blocks IDE fail opening file allegro.h (right are ok)
 Full log can be some thousand lines...
 
 Platforms:
 Raspbian 32Bit on raspberry Zero W, C:B OK
 Raspbian 64Bit on raspberry 3B+ C:B report stack overflow/out of memory on compiler, this is a raspbian issue, ( stand by for now)
 (dead PC Sony Vaio I7) Linux mint 17.3 OK
 All other cross platform involved in this project compile fine also on new offending platform.
 
 
 Offending:
 New PC Lenovo-V155-15API 20GB ram, 1TB SSD
  Linux Mint 19.2
 All Library installed
 Command line produce obj  no error no warning
 Code::Blocks release 17.12
 IDE used just to produce Linux bin.
 FPGA, Embedded, QT don't use C:B
 Project compile on QT too but with different define and without file including allegro of course.
 I still need Allegro version on command line.

 log of errant part
||=== Build: Debug in PP52_Z80_Emulator (compiler: GNU GCC Compiler) ===|
/home/xxxxxxxxxx/driver/keyboard/matrixkeyb.c|2|fatal error: allegro.h: No such file or directory|
/home/xxxxxxxxxx/driver/display/Allegro/lcrt_alginit.c|14|fatal error: allegro.h: No such file or directory|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

 Note: xxxxxxxxxx is obfuscated due this is production environment.


 Code, compiler iwhere OK, /usr/include contain file but C:B don't find and directory structure seems scrambled, I think about a possible buffer overflow or similar issue. Top file on C:B doesn't exist on /usr/include. File C::B say not found is on /usr/include/allegro.h,file is readable same user on text editor.

 Best regards
 Roberto
« Last Edit: November 17, 2019, 09:42:42 pm by RRomano001 »

Offline RRomano001

  • Single posting newcomer
  • *
  • Posts: 9
Re: Compile error: GCC don't find a file on include directory
« Reply #3 on: November 17, 2019, 11:22:43 pm »
 After brwsing a lot of useless post I never found where default.config is stored nor .config is more updated.
 Inspecting launch I seen is issued by flatpak....

 After launching again got the culprit of this.
 Opened again a file from /usr/include
from left pane menu item "open containing folder" ...
 containing folder is not /usr/include as stated from cursor on file pane but...
 open a flatpak from var directory is not what I was thinking about, so compiler issue is cleanly coming from flatpak.
 allegro.h is on /usr/include so launching gcc from command line compile hassle free.
 Compiling from inside C::B is scrambled by flatpak and fail.

 Is enough this post or need open a ticket? If so what type of ticket can be close to this issue from flatpak sandbox?

 Is forever true if it work never upgrade.

 Regards
 Roberto
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compile error: GCC don't find a file on include directory
« Reply #4 on: November 17, 2019, 11:38:59 pm »
Inspecting launch I seen is issued by flatpak....
Code::Blocks is not ported to flatpak. Any flatpak release you see in the wild would probably be totally broken. Highly recommended to not use flatpak!

p.s. I've not read anything else on this topic...
p.p.s. As far as I know in order to get C::B working in flatpak you have to put everything (compilers, sdk, etc) in the flatpak.
(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 RRomano001

  • Single posting newcomer
  • *
  • Posts: 9
Re: Compile error: GCC don't find a file on include directory
« Reply #5 on: November 18, 2019, 12:05:08 am »
Code::Blocks is not ported to flatpak. Any flatpak release you see in the wild would probably be totally broken. Highly recommended to not use flatpak!

 Thank for confirming not to use flatpak, I was aware of before discovering troubles of C::B are coming from it.

 The question is how to install or launch C::B 17.12 on Linux mint 19.2.  Release 16.x from distribution seems broken and as I discovered now 17.12 is plagued by flatpak...

  Suggestion are welcome, I hate learn about a broken package and time I lost migrating project is too much to downgrade to mint 18.x...
 I can try port command line to QT or Eclipse but ... I used C:B reliably since long time ago to leave project on it.
 Regards
 Roberto

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compile error: GCC don't find a file on include directory
« Reply #6 on: November 18, 2019, 01:18:15 am »
Build packages manually. It is not hard.

These are the actual commands for a svn/git checkout: https://github.com/obfuscated/codeblocks_sf/blob/master/.travis.yml
For the release archives the commands are similar (probably just the command on the last line would be enough).
(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 RRomano001

  • Single posting newcomer
  • *
  • Posts: 9
Re: Compile error: GCC don't find a file on include directory
« Reply #7 on: November 20, 2019, 06:53:21 pm »
Build packages manually. It is not hard.
Thank for all assistance and hints.
 Finally I prefer'd fix library and remain at release of distribution.

 Release 16.1 never started, dead silently with this error:
codeblocks: symbol lookup error: codeblocks: undefined symbol: _ZN24IncrementalSelectListDlgD1Ev

 Purged both codeblocks binary and library of version 16.1.
 Reinstalled from apt-get on command line all returned to life, also all setting and history of Code::Block from old home.
 Now 16.1 has linking error but that is fine just need recompile an external emulator I can import to project.

 after this release 17.1 still is installed and report his dependence from flatpak in braces on right of menu entry.
 Regards.
 Roberto
« Last Edit: November 23, 2019, 10:58:34 am by RRomano001 »