LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2012, 05:55 PM   #1
forestcreature
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Rep: Reputation: Disabled
Xorg header files present but killing compiles (sw13.37)


Hi there,

I have a frustrating problem which repeats itself whenever I try to compile anything requiring the X11 headers. I've put some illustrative output below.

Code:
...

/usr/include/X11/Xlib.h:3589:14: error: storage class specified for parameter 'XLocaleOfOM'
/usr/include/X11/Xlib.h:3596:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_X_SENTINEL'
/usr/include/X11/Xlib.h:3598:13: error: storage class specified for parameter 'XDestroyOC'

... etc. etc. etc. etc. etc. and etc.!

screenshot.c:187:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
screenshot.c:273:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
screenshot.c:288:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/X11/Xlib.h:3575:14: error: old-style parameter declarations in prototyped function definition
/usr/include/X11/Xlib.h:3576:5: error: parameter name omitted
screenshot.c:307:1: error: expected '{' at end of input
make[2]: *** [screenshot.o] Error 1
make[2]: Leaving directory `/usr/src/denemo-0.9.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/denemo-0.9.2'
make: *** [all] Error 2
The header files themselves don't *look* mangled to my naive eye. Just to be sure, I reinstalled the libX11 package from the official sw distribution and got the same errors.

This has happened with all X applications I have tried to compile in the last two weeks or so, so it is almost certainly an issue with my system.

Any ideas?

Bests,
jj

EDIT: I've reverted back to gcc and utils 4.5.2 to match the official distribution and still the same error!

Last edited by forestcreature; 01-08-2012 at 07:03 PM.
 
Old 01-10-2012, 12:43 AM   #2
mulyadi.santosa
Member
 
Registered: Sep 2011
Posts: 96

Rep: Reputation: 15
Hi Forestcreature

I don't know about the validity of your X related libraries, but for sure there are serious errors in your application. Here is one the line that clearly shows this:

screenshot.c:307:1: error: expected '{' at end of input


that is an explicit coding error in a C language. So I suggest to re download the stable version of this application or wait for a fix.
 
Old 01-10-2012, 02:45 AM   #3
forestcreature
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for the answer. That's what I thought, but as I said - this happens when I'm compiling any software requiring X, whether stable or development release. This is what bothers me...

j
 
Old 01-10-2012, 02:57 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
No errors with the application : denemo-0.9.2
http://ftp.gnu.org/gnu/denemo/denemo-0.9.2.tar.gz

denemo-0.9.2, a clean Slackware 13.37 - 64bits, gcc-4.5.2 : No errors.
( May be a couple of warnings.)

denemo-0.9.2, other OS's, 32bits, gcc-4.6.2, gcc-4.5.2 : No errors, no warnings.


So either you have a corrupt OS ? Or corrupt source files ?

..

Last edited by knudfl; 01-10-2012 at 02:59 AM.
 
Old 01-10-2012, 03:01 AM   #5
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
We really can't help with out a copy of the code you are trying to compile.

Tracing C/C++ compile errors requires you to look at everything especially when you get the screenshot.c:307:1: error: expected '{' at end of input

Which really suggest a typo in the code with a missing { or extra } somewhere
 
Old 01-15-2012, 04:33 PM   #6
forestcreature
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for the help so far. The errors are a heck of a lot of lines, so when I get time I'll have to upload an archive somewhere. If you think that I should ask in a gcc specific mailinglist or something then tell me to piss off - I won't be offended

In brief though, the stable, latest version of any well-known X app (e.g. Xclock) returns these kinds of syntax errors, whilst something else I compiled (ANYTHING else which doesn't require the Xorg headers does not.

Sorry, can't spend more time on this tonight but if anyone still cares I'll try and give proper examples.

Bests,
Jj
 
Old 01-15-2012, 05:08 PM   #7
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Just noticed that the software you were trying to compile has been listed and tried it myself.

It has quite a few extra deps including one that doesn't have a slackbuild available so I'm thinking that in the process of adding some extra packages you managed to break some part of the development system.

At this point I would start by making a list of anything that was added to the system and cleaning out as much as possible and going back and uninstalling everything from the 'd' series and reinstalling it all to ensure you have a clean c/c++ compiler and headers.
 
Old 01-16-2012, 11:19 AM   #8
forestcreature
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Cheers Wildwizard, I'll do that!

j
 
  


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
[SOLVED] include not working despite header file present lapackpp.h nerak99 Programming 3 09-21-2011 05:57 AM
Can't compile a driver without header files present? dkathrens77 Linux - General 5 06-14-2011 11:03 AM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM
Restart xorg without killing KDE flamy Linux - Laptop and Netbook 5 05-18-2007 05:10 AM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:34 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