LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2011, 10:49 AM   #1
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
Repeated build error


OK, this is driving me nuts. I needed glib-2.28 to build one single package that won't build with later glib, so I eradicated 2.31 and built 2.28, then I built my dependant package, eradicated glib-2.28 and re-built 2.31. After this I went on to successfully build xfce.

However, many programs using glib are now fine at ./configure, but are failing make, and the only common element is glib. The errors are:

error: #error "Only <glib.h> can be included directly."

There's usually the attempted include shown, but it varies depending on the package I'm trying to build. I'm sure there must be a CFLAG or something that needs setting, but I can find nothing.

Does anyone have any ideas?
 
Old 11-17-2011, 05:56 AM   #2
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Try googling for
Code:
#error "Only <glib.h> can be included directly.
 
Old 11-17-2011, 06:00 AM   #3
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300

Original Poster
Blog Entries: 1

Rep: Reputation: 55
I've googled it every which way, and whilst I can find possible fixes for building specific programs, nothing that points to the underlying cause to enable a fix across the board. (No fixes for the programs I'm trying to compile, either).
 
Old 11-17-2011, 06:05 AM   #4
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Well this post seems to have something to say on the matter.
 
Old 11-17-2011, 06:10 AM   #5
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Seems like the problem is that ./configure adds "-DG_DISABLE_SINGLUE_INCLUDES" to CFLAGS of the application being compiled, while some other libs and headers aren't ready for that.
So, in those applications, try to remove this flag from CFLAGS, either in ./configure or elsewhere.
Dirty fix.
 
Old 11-17-2011, 06:27 AM   #6
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
...Although, here it gives to understand that such error should appear starting from as early as version glib-2.17. So must make no difference between 2.28/2.31 it seems.

Therefore, from the looks of it, the problem must be the applications using this CFLAGS definition in ./configure and configure.h.
 
Old 11-17-2011, 09:17 AM   #7
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300

Original Poster
Blog Entries: 1

Rep: Reputation: 55
Well, I tried an alternative fix, which was to go through the sources as they fail in make, and replace the includes with #include <glib.h>, then reconfigure and re make. This has allowed certainly one test application (xchat) to successfully build (and works after testing), so for now I'll mark this solved.

Last edited by Roken; 11-17-2011 at 09:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
jhbuild: Error during phase build of gnome-shell: Error running make Kenny_Strawn Linux - Desktop 1 07-09-2010 06:01 PM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM
Repeated System Failure with "Lost Interrupt" error. codedv Linux - Hardware 3 07-24-2006 03:54 AM
Repeated Error with C compiler morelikebovine Linux - Software 4 04-08-2006 04:45 AM
Repeated install error from bootdisk: BOOT FAILED mjmason Slackware - Installation 2 07-14-2005 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration