Opened 20 years ago

Last modified 20 years ago

#559 closed defect (fixed)

Assorted Solaris Build Issues

Reported by: warmerdam Owned by: dron
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: cgt@…

Description

Hello,

FYI, I have long time had to copy  both the ../o/%.o  to %.o files for
the ogr to compile (within port). I'm using Solaris 8, Sun ++ 5.5.
On Linux it works fine.

I'm just trying to update gdal on the solaris, so I'll give you all my
fixes below .  Mostly cast errors. The Sun's are not allowed on the internet, so
here   is the messy result.

gxfopen.c: 665:  have to explicit cast return value to CPLErr
geo_new.c :63 GTIFNew(tiff * tif) instead of (void* tif)
geo_write.c:179 changed counter to : key = (geokey_t)((int(key) +1)
geo_normalize:336 have to cast to char * (from a const char *)
tif_dir: 566 tv->value must be casted to (char*)
tif_dirread.c: 111 The returned value from realloc must be casted to
(toff_t*)
tif_memio.c: 251: cast new_buffer to (unsigned char *)
ceosrecipe.c 230 must cast return value to RecipeFunctionData_t *
                   266 must cast token to CeosRecipeType_t *
                  481 must cast link->object to (RecipeFuncionData_t *)
                  505 buffer must be casted to (const char *)
                     535 return value must be casted to (char *)
ceossar.c 135: links->object must be casted to (CeosRecord_t *)
ceos.c: 60  cast ,97, 371 value to unsigned char *
      302: value should be casted to const char *
         369: return value should be casted to CeosRecord_t *
fastdataset.c:389: pszString should casted to char *
dted_ptstream.c: 198 return value cast to DETDCachedFile*
               202 return value should be casted to short **
               234  return .. short *
               427 iMD must be cast to DTEDMetaDataCode
nitfimage.c: 944  pDAta must be casted to unsigned char *
egif_lib.c: 438 Extension must becasted unsigned char *
    217  GifVersionPrefix must be casted unsigned char *
    551  c must casted unsigned char *
    814-> (unsigned char *)(sp->  ... ),

dgif_lib.c 124,188,946 second argumdne must be casted to unsigned char *
    944 The cast chould be char * instead of GifPixelType *
    973: &Extdata[1]  must be casted char *
pngread.c: 1229 return value must be casted to unsigned char *
pngset.c: 428, 430 return value cast to char *
    723 reutnr value must cast to unsigned char *
shptree.c : 495: return value cast to int *
        502: cast return to SHPObect **
avc_bin.c line 1301, 1456, 1599, 1607, 1645, 1665, 2160. 3rd  argument must be
casted to GByte OR AVCRawBinReadStrin should use char * as argument.
avc_bin.c line 1622, 1938 3rd arg must cast to GByte *
avc_mbyte.c: 465 529 retrun value should cast to const char *
avc_rawbin.c-.312 return value must cast to const unsigned char *
    412 cast &c to GByte*
swq.c: 859 cast op_code to (swq_op)
    1625 return value should cast to swq_table_def*
    2334,2449 retrn should cast char *

If you check the above into cvs, I'll be happy to verify.
Regards Christian 

----

Later Christian writes:

Hello,

Please disregard my mail from yesterday. It is completely embarising; I had env
CC=CC instead of cc.

Only the rules

FYI, I have long time had to copy  both the ../o/%.o  to %.o files for
the ogr to compile (within port). I'm using Solaris 8, Sun ++ 5.5.
On Linux it works fine.

apply.

sorry for any inconvenience (hope you ignored in first place)

Regards Christian

Email: cgt at navicon dot dk


----

The gxfopen.c patch has been applied.  All others pending.

Change History (3)

comment:1 by warmerdam, 20 years ago

Andrey,

Do you think there is anything that needs to be done about this?

comment:2 by cgt@…, 20 years ago

Have been doing some builds on 1.2.1, and only one item is outstanding:

within GDALmake.opt I have to add %.o rules for
the ogr to compile (within port). I simply use the ../o/%.o as template. That is
I    copy the four lines composing the rules and take out ../o/ then it works. 

comment:3 by warmerdam, 20 years ago

Funky.  It is my understanding that GNUmake has implicit rules that look 
essentially like:

%.o:	%.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

%.o:	%.cpp
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

I don't understand why we would need to add them.  However, experiments show
this to be harmless on my system where it isn't needed so I will commit
the change (to GDALmake.opt.in that is). 


Thanks



Note: See TracTickets for help on using tickets.