Choosing Compilers

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
ruckusman
Posts: 401
Joined: Sun Jan 11, 2004 7:15 am
Location: Australia

Choosing Compilers

Unread postby ruckusman » Fri Mar 12, 2004 11:46 pm

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

User avatar
foetz
Moderator
Moderator
Posts: 5713
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Unread postby foetz » Sat Mar 13, 2004 1:05 am

hello,

just set CC=gcc and CXX=g++
r-a-c.de

hamei
Posts: 10002
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Choosing Compilers

Unread postby hamei » Sun Mar 14, 2004 2:07 am

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 :-(

User avatar
ruckusman
Posts: 401
Joined: Sun Jan 11, 2004 7:15 am
Location: Australia

Positively negative

Unread postby ruckusman » Sun Mar 14, 2004 7:02 am

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.

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Unread postby ShadeOfBlue » Sun Mar 14, 2004 8:15 am

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: Select all

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!

User avatar
foetz
Moderator
Moderator
Posts: 5713
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Unread postby foetz » Sun Mar 14, 2004 5:24 pm

hello,

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Unread postby ShadeOfBlue » Sun Mar 14, 2004 10:32 pm

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 ;)

User avatar
ruckusman
Posts: 401
Joined: Sun Jan 11, 2004 7:15 am
Location: Australia

Getting close help please

Unread postby ruckusman » Mon Mar 15, 2004 3:16 am

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: Getting close help please

Unread postby ShadeOfBlue » Mon Mar 15, 2004 4:23 am

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...

User avatar
ruckusman
Posts: 401
Joined: Sun Jan 11, 2004 7:15 am
Location: Australia

Getting closer

Unread postby ruckusman » Mon Mar 15, 2004 4:59 am

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: Getting closer

Unread postby ShadeOfBlue » Mon Mar 15, 2004 10:23 am

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.

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 :)

User avatar
ruckusman
Posts: 401
Joined: Sun Jan 11, 2004 7:15 am
Location: Australia

Thanks

Unread postby ruckusman » Tue Mar 16, 2004 4:36 am

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

User avatar
ShadeOfBlue
Moderator
Moderator
Posts: 799
Joined: Tue Nov 25, 2003 12:09 pm
Location: Europe

Re: Thanks

Unread postby ShadeOfBlue » Tue Mar 16, 2004 5:40 am

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 ;)


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 1 guest