RH8.0 Statically linked application gives error in 9.0 (cannot h andle file 'libc.so.6' with TLS data)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

 I wrote and compiled the following test program in RH8.0 as statically
linked executable.
The executable works fine in 8.0 but fails in 9.0 with following error:

cannot handle file 'libc.so.6' with TLS data

Please don't start GPL/LGPL issues. I don't want to go for dynamic
linking for some reasons.

Any ideas or workarounds?

Thanks.

--T. Muthu Mohan

-----[ mystatic.cpp ]----------------

#include <iostream.h>
#include <dlfcn.h>

#define LIBNAME "libz.so"  // you can use any shared library instead of
'libz.so' 

int main()
{
        void *pHandle = dlopen(LIBNAME, RTLD_NOW);
        cout << "After Loading " << LIBNAME << endl << dlerror() <<
endl;
        if (pHandle) {
                cout << "Loaded Successfully!" << endl;
                dlclose(pHandle);
                cout << "Unloaded Successfully!" << endl;
        }
        return 0;
}

-----[ output in RH8.0 ] --------------------

# g++ -static mystatic.cpp  -ldl
# ./a.out
After Loading libz.so
(null)
Loaded Successfully!
Unloaded Successfully!

----[ output in RH 9.0 ] --------------------------
# ./a.out
After Loading libz.so
cannot handle file 'libc.so.6' with TLS data


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux