Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Thu Jul 31, 2014 9:46 pm

All times are UTC - 8 hours


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Choosing Compilers
Unread postPosted: Fri Mar 12, 2004 11:46 pm 
Offline
User avatar

Joined: Sun Jan 11, 2004 7:15 am
Posts: 401
Location: Australia
Dumb question time,

I would like to compile the package found here

http://www.harrington.com/QuadReadMe.html

as an add on to Gimp-Print

But I have an evaluation version of th MIPS Pro compiler installed that has timed out, so when I try to run the makefile it gives me errors about the licence.

Can someone tell me what I have to do to to get the GCC compiler to execute instead. I'm sure I've done this before but can't for the life of remember how.

Thanks

Glenn


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Mar 13, 2004 1:05 am 
Offline
User avatar

Joined: Mon Apr 14, 2003 3:34 am
Posts: 5096
hello,

just set CC=gcc and CXX=g++

_________________
r-a-c.de


Top
 Profile  
 
 Post subject: Re: Choosing Compilers
Unread postPosted: Sun Mar 14, 2004 2:07 am 
Offline

Joined: Tue Feb 24, 2004 4:10 pm
Posts: 9478
ruckusman wrote:

But I have an evaluation version of th MIPS Pro compiler installed that has timed out, so when I try to run the makefile it gives me errors about the licence.


Are you sure there are actual errors ? I could swear I've read SGI people saying that the eval versions do time out and nag you but they still work anyway.

Altho with SGI's new bottom-feeding habit trying to bleed every little nickel from every potential user, it's possible that that has been changed :-(


Top
 Profile  
 
 Post subject: Positively negative
Unread postPosted: Sun Mar 14, 2004 7:02 am 
Offline
User avatar

Joined: Sun Jan 11, 2004 7:15 am
Posts: 401
Location: Australia
Yes unfortunately, it wasn't even a demo licence, it was installed on the machine when I got it and has a dummy password of 0. I did have an Indy some time ago that had a demo licence installed, SGI no longer offers demo/evaluation licences for their compilers, checked yesterday and I can't seem to get the above commands to work, it still defualts to the Mips Pro compiler and says no licence is installed :( If anyone could help out, I'm totally in the dark here, tried compiliing ages ago, but I've lost all of my notes that I had to get me started.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Mar 14, 2004 8:15 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 12:09 pm
Posts: 795
Location: Europe
If the program you are trying to compile has a configure script, then do this before compiling:
(I'll assume that you are using the tcsh shell and you are running this on a mips4 machine (R5000 and up), otherwise change mips4 to mips3)

Code:
setenv CC "gcc"
setenv CFLAGS "-mips4 -mabi=n32 -mtune=mips4 -I/usr/freeware/include -I/usr/local/include"
setenv CXX "g++"
setenv CXXFLAGS "-mips4 -mabi=n32 -mtune=mips4 -I/usr/freeware/include -I/usr/local/include"
setenv CPPFLAGS "-I/usr/freeware/include -I/usr/local/include"
setenv LDFLAGS "-mips4 -L/usr/freeware/lib32"

./configure [plus any options from './configure --help' you might want to specify]
gmake
gmake install [as root]


And that's all! (That is, if the configure script isn't broken...)
If it has a Makefile and no configure script then you'll have to edit it.

Good luck!


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Mar 14, 2004 5:24 pm 
Offline
User avatar

Joined: Mon Apr 14, 2003 3:34 am
Posts: 5096
hello,

i never tried it but i think it's not necessary to declare -I/xxx 2 times...

_________________
r-a-c.de


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Mar 14, 2004 10:32 pm 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 12:09 pm
Posts: 795
Location: Europe
foetz wrote:
i never tried it but i think it's not necessary to declare -I/xxx 2 times...


Yes, that's true, only once should do... but some sonfigure scripts are badly written and they ignore CPPFLAGS...
Don't know if they fixed that yet, so I declared the includes twice... just to make sure ;)


Top
 Profile  
 
Unread postPosted: Mon Mar 15, 2004 3:16 am 
Offline
User avatar

Joined: Sun Jan 11, 2004 7:15 am
Posts: 401
Location: Australia
O.K the about the setting the compile environment worked a treat, editing the makefiles, but...

I had to get the printutil.h file from the gimp-print source and modifiy a few other things and I'm nearly at the end, but I keep getting an error that I can't figure out, it's at the end of this makefile

#
# Makefile file for QuadToneRIP Raster Source
#
# Copyright (c) 2003 -- Roy V. Harrington
#

QUAD_SOURCES = quadraster.c raster.c
QUAD_HEADERS = raster.h
QUAD_OBJECTS = quadraster.o raster.o
QUAD_PROGRAM = quadraster

RASTER_SOURCES = rastertoprinter.c raster.c
RASTER_HEADERS = raster.h xmalloc.c
RASTER_OBJECTS = rastertoprinter.o raster.o
RASTER_PROGRAM = rastertoprinter-quad
RASTER_SCRIPT = quadrastertoprinter
RASTER_LIBRARY = main/libgimpprint.a

CC = gcc
CXX = g++
CXXFLAGS = -mips4 -mabi=n32 -mtune=mips4
CPPFLAGS = -I/usr/freeware/include -I/usr/local/include
CFLAGS = -g -O -I. -DQUADPATH=\"`cups-config --datadir`\" -mips4 -mabi=n32 -mtune=mips4
LDFLAGS = -mips4 -L/usr/freeware/lib32
INSTALL = install -c -m 755
CUPSDATADIR = /usr/freeware/share/cups/
CUPSFILTER = /usr/freeware/lib32/cups/
QUADBINARY = /usr/freeware/bin

all: $(QUAD_PROGRAM) $(RASTER_PROGRAM)

install: $(QUAD_PROGRAM) $(RASTER_PROGRAM) $(RASTER_SCRIPT)
$(INSTALL) $(QUAD_PROGRAM) $(QUADBINARY)
$(INSTALL) $(RASTER_PROGRAM) ${CUPSFILTER}
$(INSTALL) $(RASTER_SCRIPT) ${CUPSFILTER}

clean:
rm -f $(QUAD_OBJECTS) $(RASTER_OBJECTS)
rm -f $(QUAD_PROGRAM) $(RASTER_PROGRAM)
rm -f $(RASTER_LIBRARY)
cd main; make clean

$(QUAD_OBJECTS): $(QUAD_HEADERS)

$(RASTER_OBJECTS): $(RASTER_HEADERS)

$(QUAD_PROGRAM) : $(QUAD_OBJECTS)
cc -g -o $(QUAD_PROGRAM) $(QUAD_OBJECTS)

This line is causing te problems

$(RASTER_PROGRAM) : $(RASTER_OBJECTS) $(RASTER_LIBRARY)
cc -g -o $(RASTER_PROGRAM) $(RASTER_OBJECTS) $(RASTER_LIBRARY) -lcups -lm


$(RASTER_LIBRARY) :
cd main; make

The error I'm getting is

ld32 : FATAL 9: I/O error (-lcups): No such file or directory
collect2: ld returned 32 exit status
***Error code 1 (bu21)

I'm totally lost on this one, if someone can help I'd really appreciate it
Thanks

Glenn


Top
 Profile  
 
Unread postPosted: Mon Mar 15, 2004 4:23 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 12:09 pm
Posts: 795
Location: Europe
ruckusman wrote:
ld32 : FATAL 9: I/O error (-lcups): No such file or directory
collect2: ld returned 32 exit status
***Error code 1 (bu21)


The configure script is broken... Try adding "-L/usr/freeware/lib32" (or wherever the libcups library is...) before "-lcups -lm" on the red line.
That should fix the problem...

The other funny thing is, that the configure script ignored your wish to use gcc as the compiler...
Just change every "cc" to "$(CC)" to fix this...


Top
 Profile  
 
 Post subject: Getting closer
Unread postPosted: Mon Mar 15, 2004 4:59 am 
Offline
User avatar

Joined: Sun Jan 11, 2004 7:15 am
Posts: 401
Location: Australia
ShadeOfBlue,

There wasn't a configure script with the source, and I'm not experienced enough to write one so I've edited the makefiles instead, the settings you gave me have worked wonderfully and I've just done a make clean and am trying again with the "-L/usr/freeware/lib32 in the makefile with that particular section

Fingers crossed, thanks heaps everyone for you help so far

Glenn


Top
 Profile  
 
 Post subject: Re: Getting closer
Unread postPosted: Mon Mar 15, 2004 10:23 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 12:09 pm
Posts: 795
Location: Europe
ruckusman wrote:
There wasn't a configure script with the source, and I'm not experienced enough to write one so I've edited the makefiles instead


I see. Well, the makefile you posted is quite nicely written, with the libraries at the end of the compile line, like they should be (some makefiles have them in the wrong order or at the beginning...), etc.

Quote:
the settings you gave me have worked wonderfully and I've just done a make clean and am trying again with the "-L/usr/freeware/lib32 in the makefile with that particular section


Nice to hear that. I hope it will work now :)


Top
 Profile  
 
 Post subject: Thanks
Unread postPosted: Tue Mar 16, 2004 4:36 am 
Offline
User avatar

Joined: Sun Jan 11, 2004 7:15 am
Posts: 401
Location: Australia
I've got you to thank for the well set out makefile as I copied verbatim the suggestions you gave me in your earlier post. Thaks heaps for your help as I've now had one success and have a better understanding, so hopefully if I can have a go at compiling some more stuff and maybe make a contribution some day.

Glenn


Top
 Profile  
 
 Post subject: Re: Thanks
Unread postPosted: Tue Mar 16, 2004 5:40 am 
Offline
Moderator
Moderator
User avatar

Joined: Tue Nov 25, 2003 12:09 pm
Posts: 795
Location: Europe
ruckusman wrote:
I've got you to thank for the well set out makefile as I copied verbatim the suggestions you gave me in your earlier post. Thaks heaps for your help as I've now had one success and have a better understanding, so hopefully if I can have a go at compiling some more stuff and maybe make a contribution some day.


You're welcome :)
I'm glad that I was of some help.
Don't hesitate to post on this forum if you need any further help with compiling something, a lot of people here are willing to help out :)

Good luck at compiling things ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: robespierre and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group