Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Compiling ghostscript v 9.21

Programming


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-04-2017   -   Original Discussion by jgt
jgt's Unix or Linux Image
jgt jgt is online now Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 21 November 2017, 6:58 AM EST
Location: 44.21.48N 80.50.15W
Posts: 2,002
Thanks: 2
Thanked 272 Times in 255 Posts
Compiling ghostscript v 9.21

I ran configure, and then make, using the SCO 6.0.0 cc compiler.

Code:
-bash-3.2# make                                                                 
UX:make: ERROR: bad character | (octal 174), line 277 (bu40)UX:make: ERROR: Mess
age not found!!                                                                 
.

Is this error in the Makefile, as line 277 of it appears to be correct,

Code:
272  # Choose shared or compiled in libjbig2dec and source location         
273  # JBIG2_LIB=jbig2dec                                                   
274  JBIG2_LIB=jbig2dec                                                     
275  SHARE_JBIG2=0                                                          
276  JBIG2SRCDIR=./jbig2dec                                                 
277  JBIG2_CFLAGS=-DHAVE_STDINT_H=1                                         
278                                                                         
279  # uncomment the following three lines and one of the last two to

Unless the comment lines in the Makefile are discarded.
Sponsored Links
    #2  
Old Unix and Linux 08-05-2017   -   Original Discussion by jgt
hicksd8 hicksd8 is online now Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 21 November 2017, 6:55 AM EST
Location: Devon, UK
Posts: 1,604
Thanks: 232
Thanked 398 Times in 336 Posts
Hmmmmm.......well jgt, with your enormous contribution to this forum you would have already tried the obvious so this is probably just 'second opinion' rather than a solution.

Octal 174 is the pipe '|' character in most ascii sets, hex 7C, dec 124.

Try using a suitable (hex) editor to find any instances of 7C in the file and whether it finds one on line 277.

Make a backup copy of the file and then delete line 277 and retype it in manually to ensure any hidden/unprintable characters are removed. Do you get the same error? If a hidden character has been removed I would at least expect a different error even if it still doesn't work.

Any make/compiler that reports wrong line numbers by omitting comment lines is about as much use as a chocolate teapot so my opinion is that the error line number would be correct (unless it's inserting some other source file and including the line count in that).

If you look at the code (you didn't post the whole file) do you reckon that the '-' after the '=' is correct? I guess that it's just creating a switch option on a command line.

Last edited by hicksd8; 08-05-2017 at 06:24 AM..
Sponsored Links
    #3  
Old Unix and Linux 08-05-2017   -   Original Discussion by jgt
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 21 November 2017, 4:01 AM EST
Location: San Jose, CA, USA
Posts: 10,667
Thanks: 572
Thanked 3,736 Times in 3,188 Posts
Hi jgt,
Assuming the line numbers are correct, one might guess that there is a <vertical-bar> character (AKA pipe symbol) followed by a <backspace> on line 277 and those two characters are being replaced by whatever character follows them (making the <vertical-bar> invisible when you print the line to a non-hardcopy device).

Hi hicksd8,
In a makefile, the CFLAGS macro is a list of command line options to be fed to the C compiler. Presumably, JBIG2_CFLAGS is a macro in this makefile that will be assigned to CFLAGS or used in addition to it when the target being built is JBIG2. (And the C compiler command line option -DHAVE_STDINT_H=1 initializes the C macro HAVE_STDINT_H to have the value 1).
The Following User Says Thank You to Don Cragun For This Useful Post:
hicksd8 (08-05-2017)
    #4  
Old Unix and Linux 08-05-2017   -   Original Discussion by jgt
hicksd8 hicksd8 is online now Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 21 November 2017, 6:55 AM EST
Location: Devon, UK
Posts: 1,604
Thanks: 232
Thanked 398 Times in 336 Posts
@Don.....Thanks for the clarification. I thought that if you specify CFLAGS without a leading '-' that the system would insert one automatically on the compiler command line. Therefore, actually supplying a '-' at the start of CFLAGS would put two ('--<whatever>') on the compiler command line. Anyway, got it!
Sponsored Links
    #5  
Old Unix and Linux 08-06-2017   -   Original Discussion by jgt
jgt's Unix or Linux Image
jgt jgt is online now Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 21 November 2017, 6:58 AM EST
Location: 44.21.48N 80.50.15W
Posts: 2,002
Thanks: 2
Thanked 272 Times in 255 Posts
I put another hour or so into it. I changed the PATH so that gcc 2.95 was ahead of the SCO cc, and used gnu make instead of SCO and that eliminated the error with the |. However, a new problem appeared. It seems that the new version of Ghostscript requires a version of gcc newer than 2.95.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ghostscript on SCO 5.0.7 kberger82 UNIX for Dummies Questions & Answers 0 10-02-2008 06:58 PM
Ghostscript capeme UNIX for Dummies Questions & Answers 6 11-20-2007 01:47 PM
Ghostscript Question falcon2460 UNIX for Dummies Questions & Answers 1 03-07-2002 06:35 AM
Perl and ghostscript Prafulla UNIX for Dummies Questions & Answers 1 12-24-2001 08:47 AM



All times are GMT -4. The time now is 08:12 AM.