Opened 13 years ago

Closed 10 years ago

#99 closed defect (fixed)

Installation problem

Reported by: andrestlz Owned by: Norm Olsen
Priority: critical Milestone:
Component: Library Version: svn-trunk
Keywords: Cc:

Description (last modified by andrestlz)

Trying to compile CsMap, occurs this error:

[root@localhost Source]# make -fLibrary.mak gcc -c -DGCC_3 -DCPP -Wall -O3 -I../Include CS_ansi.c CS_ansi.c:551: error: conflicting types for ‘CS_strtol’ ../Include/cs_map.h:7084: error: previous declaration of ‘CS_strtol’ was here make: * [CS_ansi.o] Error 1

OS: Linux CentOS 5.5

I would like anybody can help me with this problem.

Thanks

Change History (6)

comment:1 by andrestlz, 13 years ago

Description: modified (diff)

comment:2 by Norm Olsen, 13 years ago

Owner: changed from hugueswski to Norm Olsen

Oops!!! Trac is supposed to e-mail me whenever sonmething new is added. It didn't. SO, 7 days afetr the fact I have discovered your message. I apologize.

We routinely compiler the library using a gcc compiler under Linux using a virtual machine. Of course, we have not encountered this error. Nevertheless, I'll take a look under the hood and see if I can make a suggestion. Looks like maybe some of the conditional compiles which we use to get compilation in various environments are not working the same on the compiler you are using.

comment:3 by Norm Olsen, 13 years ago

I suspect that you are compiling for 64 bit Linux. You have found an instance of failure in our fix to CS-MAP for 64 bit Linux. The type of the CS_strtol function in the ca_map.h header file should be long32_t (not long).

Certain compilers (mostly on Linux/UNIX boxes) consider an ordinary longto be a 64 bit integer. We intrioduced the long32_t typedef to force all longs to be 32 bits. You have encounted a bust where we got the definition in CS_ansi.c correctly typed, but the declaration in the header file was not changed and is, therefore, inconsistent with the definition.

comment:4 by andrestlz, 13 years ago

Thanks a lot. That issue was solved editing ansi.c file. Installation passed this issue but stops again, now the problem is the following: gcc -c -DGCC_3 -DCPP -Wall -O3 -I../Include csEpsgStuff.cpp csEpsgStuff.cpp: In member function âbool TcsEpsgDataSetV6::ProjectedCoordsys(cs_Csdef_&, const TcsEpsgCode&, const TcsEpsgCode&) constâ: csEpsgStuff.cpp:2980: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: ../Include/csepsgstuff.h:343: note: candidate 1: bool TcsEpsgCode::operator==(long unsigned int) const csEpsgStuff.cpp:2980: note: candidate 2: operator==(long unsigned int, ulong32_t) <built-in> make: * [csEpsgStuff.o] Error 1 What can be wrong here?

Many thanks for your support.

Regards.

comment:5 by Norm Olsen, 13 years ago

In looking for other instances of this problem, we found a whoel set of function protocols in the cs_map.h header file for which there were no function definitions. These orphan protocols should alos be deleted.

comment:6 by Norm Olsen, 10 years ago

Resolution: fixed
Status: newclosed

Corrected at Revision 2003. Declaration of the return value of CS_strtol function was changed from long to long32-t.

Note: See TracTickets for help on using tickets.