PVRTexLib Linux static lib linker error


It’s me again.

I’ve just tried linking Linux static lib of PVRTexLib,
I’m using Ubuntu 14.10, 64-bit, static lib, and I’m getting this error:
“lto1: fatal error: bytecode stream generated with lto version 2.2 instead of the expected 3.0”

This didn’t happen with the previous version of PVRTexLib.

Can you recompile the lib using some newer version of the compiler please?

This is especially important, since I’ve just noticed that the older version of the library which I’m currently using, generates corrupt images of ETC2_A8 format on Linux 64.
However PVRTC generate fine there.

Windows 64 lib generates ETC2_A8 and PVRTC OK.

Hi Greg,

Thanks for reporting the issue. I haven’t seen this problem before. I’ll discuss it with the TexTool lead and will get back to you.

Hi Greg,

Which compiler and version of it are you using to compile your Linux binaries?

From this discussion in the GCC Bugzilla, it looks like you might be using a newer version of GCC than we used to compile the static library.

I’m using Ubuntu 14.10, which I’ve installed on my MacBook Air.
I’ve tried before installing 14.04, but it didn’t work on the MacBook Air at all
14.10 is the earliest version I can use.

I’m using default GCC compiler on that platform, which is 4.9.1

On my Ubuntu 14.04 virtual machine, the GCC version is 4.8.4. I believe we’re running the same version on our build system.

As discussed in our other chain for the Windows library, my recommendation would be to use the dynamic library rather than the static one. As is the case for Windows we will be discontinuing static libraries on Linux and OS X in our 4.0 SDK.