APOLLO & ECW/JP2 Discussions

Wondering how others have configured their ERDAS APOLLO server or what data they are crawling? The ERDAS APOLLO Discussion board is a place to find information, share ideas and more. Join the community, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 14
Registered: ‎05-26-2016
Accepted Solution

GCC 4.4

[ Edited ]

Hey,

 

I was wondering why does the gcc 4.4.x version is shared only now ?

 

I was using the static library built with gcc 4.4 because I support CentOS 7 which has gcc 4.8.

 

Is there any way the next patch release could re-introduce the static libs for gcc 4.4 ?

 

I would understand if it's too much of a hassle for you, just genuinely wondering.

 

Best, 

Charles

Staff
Posts: 2
Registered: ‎12-04-2016

Re: GCC 4.4

Hi Charles,
Thank you for your feedback.

 

The reason for not supporting static libraries on gcc 4.4 is that we wanted to take advantage of C++ 11 features. While the compiler itself has decent support of C++11 as of gcc4.8, its standard c++ library does not. The first C++11 feature complete standard library is the one comming from gcc 5.1.

 

While we could hide all this complexity from the developers in shared library (i.e. ECW JP2 SDK shared library is compiled using gcc 5.1 but it will run on Centos 5 and above), supporting static library would require developers to use gcc 5.1 to link against static library.

So currently, to use static library, you would need to use gcc 5.1 compiler(i presume there is no way to get rpm with gcc 5.1 but it is easy enough to compile it from sources) to produce your binary (shared library or executable). You can statically link standard library and gcc lib so that the produced libraries will still run on Centos 7.


Please let us know if you are interested in details of this solution.

Also please tell us more about your reasons to use static library and why shared library is not a viable solution?

 

Regards.
Jacek Tomaka

Occasional Contributor
Posts: 14
Registered: ‎05-26-2016

Re: GCC 4.4

Hi,

 

we use the static library because we abstracted image reading/writing into a library. We link all the image formats this library supports statically, so we only need this binary and not one for each format we support.

 

Sadly, I do not think requiring GCC >= 5.1 will be possible in the near future for our product, since our lifecycle for linux compilers is the same as Red Hat's (and RHEL6 is far from end of life).

 

Thanks for the detailed answer !

 

Best,

Charles.

Staff
Posts: 2
Registered: ‎12-04-2016

Re: GCC 4.4

Charles, 

 

I think i was not clear enough, i am sorry about that.

 

With the solution i propose your product can still be *run* on Centos 6, Centos 7 or even on Centos 5 (if you build on Centos 5). The requirement is that the gcc 5.1 is used to *compile and link* with ECW Jp2 SDK static library. It does not affect the deployment machine (aka runtime requirements) i.e. your product could still be run on vanila Centos 6. 

 

But if you want to use static library your build machine only must have gcc 5.1 installed. If you do not want to install gcc 5.1 on your build machine shared library is the way to go. Alternatively you can use version 5.2 of ECW Jp2 SDK. 

 

We provide (or possibly could provide) static library built using new C++11 ABI or old C++ ABI (https://gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/using_dual_abi.html). Both version require using gcc 5.1 for linking, though.  

 

Regards.

Jacek Tomaka

 

 

 

 

Highlighted
Occasional Contributor
Posts: 14
Registered: ‎05-26-2016

Re: GCC 4.4

Ah, I see.

 

But this would require statically linking against the libstdc++, would it not ?

I will read more about this, and not disturb you further.

 

In the meantime, we will stick to version 5.2 of the SDK.

 

Thanks a lot for your time !

Best,

Charles.