Opened 19 years ago

Closed 10 years ago

#748 closed defect (wontfix)

GDAL 1.2.5 fails to compile on SGI IRIX 6.5.25 using MIPSpro Compilers 7.4.3

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

Description (last modified by warmerdam)

The function "atoll" with is supposedly declared inside stdlib.h is not found 
by the CC compiler (c++) inside the file called /gdal-1.2.5/port/cpl_conv.cpp.  
However the configure script finds the “atoll” support and hence an error 
results from the compilation.

A simple workaround is to modify the following inside /gdal-
1.2.5/port/cpl_config.h:

#define HAVE_ATOLL 1
#undef HAVE_ATOLL

Once this is added the issue is resolved, and the library is correctly built.  
However it uses the 32bit “atol” function, which is not desirable.

I created a stand alone program utilizing "atoll" on the same platform and 
compiles with CC only if you use "using namespace std" instead of #include 
<stlib.h>.  

I hope this information would be useful in solving this problem.

Change History (4)

comment:1 by warmerdam, 19 years ago

Scott,

I could move the check for atoll to be done in a C++ environment in the 
configure script; however, I would expect this to disable the use of
atoll on IRIX.  

I am very hesitant to do the "using namespace std" thing without having
a decent grasp of the problems it is likely to cause on other system or
with other compilers.  Espcially if it involves not including stdlib.h. 

If made the change to test for atoll in the C++ environment in the configure
script, would you be willing to test that things build cleanly on your system?
It still wouldn't be 64bit safe, of course, but at least it would build easily.
It would be up to you to hack in an appropriate local fix if you need proper
64 bit support. 

comment:2 by warmerdam, 17 years ago

Description: modified (diff)
Priority: highnormal
Severity: criticalnormal

An experiment was done moving the configure test into the C++ environment, and it didn't help.

comment:3 by Jukka Rahkonen, 10 years ago

Not most common problem nowadays, perhaps could be closed?

comment:4 by Even Rouault, 10 years ago

Resolution: wontfix
Status: assignedclosed

Closing. We do not really "support" SGI IRIX

Note: See TracTickets for help on using tickets.