亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 【結(jié)貼】求助~~在AIX中如何使用GCC支持tls? [打印本頁]

作者: salman_chan    時(shí)間: 2016-04-14 17:41
標(biāo)題: 【結(jié)貼】求助~~在AIX中如何使用GCC支持tls?
本帖最后由 salman_chan 于 2016-04-18 10:29 編輯

在AIX中編譯第三方kafka庫時(shí),報(bào)錯(cuò)了

不支持TLS

gcc -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith  -c rdkafka_buf.c -o rdkafka_buf.o
In file included from rdkafka_int.h:46,
                 from rdkafka_buf.c:29:
rdtime.h: In function 'rd_ctime':
rdtime.h:83: error: thread-local storage not supported for this target

這樣編譯也不行
gcc -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -enable-tls=yes -c rdkafka_transport.c -o rdkafka_transport.o





升級(jí)了gcc版本,此問題解決

#gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/4.9.2/lto-wrapper
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.9.2/configure --with-gmp=/home/gnu/gcc482/ --with-ppl=/home/gnu/gcc482/ --with-mpfr=/home/gnu/gcc482/ --with-mpc=/home/gnu/gcc482/ --enable-languages=c,c++,fortran CFLAGS='-O2 -mpowerpc -mno-mfcrf -mtune=power6' CPPFLAGS=-fexceptions CXXFLAGS='-O2 -mpowerpc -mno-mfcrf -mtune=power6 ' CPPFLAGS=-I/home/gnu/gcc482/include LDFLAGS=-L/home/gnu/gcc482/lib --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.9.2 (GCC)


感謝版主 @windoze 的指點(diǎn)
作者: zylthinking    時(shí)間: 2016-04-14 18:48
難道不會(huì)逆向試試?
gcc -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -enable-tls=no -c rdkafka_transport.c -o rdkafka_transport.o

作者: lwhjava    時(shí)間: 2016-04-14 22:08
需要單獨(dú)安裝openssl庫吧
作者: windoze    時(shí)間: 2016-04-14 22:14
看起來像是-pthread或者-lpthread的問題,你都試試再看?

作者: 流氓無產(chǎn)者    時(shí)間: 2016-04-15 09:33
貌似是說aix的pthread版本不支持thread local storage吧,升級(jí)一下aix的gcc版本吧
作者: salman_chan    時(shí)間: 2016-04-15 09:49
回復(fù) 2# zylthinking


   昨天也試過的,還是同樣的錯(cuò)誤
作者: salman_chan    時(shí)間: 2016-04-15 09:51
回復(fù) 4# windoze


    昨天也都試過的,不管用
作者: salman_chan    時(shí)間: 2016-04-15 09:55
回復(fù) 5# 流氓無產(chǎn)者


gcc才在IBM網(wǎng)站AIX Toolbox for Linux Applications上下載的,應(yīng)該是最新的版本

sjzzw202:[/home/monitor/soft/librdkafka-master/src]#gcc -v
Using built-in specs.
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix6.1.0.0 --target=powerpc-ibm-aix6.1.0.0 --build=powerpc-ibm-aix6.1.0.0 --disable-libjava-multilib
Thread model: aix
gcc version 4.2.0
作者: salman_chan    時(shí)間: 2016-04-15 09:57
回復(fù) 3# lwhjava


    AIX Toolbox for Linux Applications 沒找到openssl庫,我去官網(wǎng)看看
作者: salman_chan    時(shí)間: 2016-04-15 10:58
回復(fù) 3# lwhjava


    ssl貌似和 線程本地存儲(chǔ)(Thread Local Storage)沒有什么關(guān)系吧
作者: windoze    時(shí)間: 2016-04-15 13:03
回復(fù) 8# salman_chan

4.2.0是最新版本?18摸果然還活在上世紀(jì)……

你的gcc貌似只有--enable-threads,沒有--enable-tls?要不你試試自己build一個(gè)GCC?
要不然你只能自己用pthread_getspecific和__attribute__ ((weak))去HACK了。
作者: salman_chan    時(shí)間: 2016-04-15 14:22
回復(fù) 11# windoze


    好高級(jí)的樣子,先仰視膜拜下版主


我再研究研究
作者: salman_chan    時(shí)間: 2016-04-18 10:26
回復(fù) 11# windoze


    果然升級(jí)到4.9版本,問題解決了


#gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/4.9.2/lto-wrapper
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.9.2/configure --with-gmp=/home/gnu/gcc482/ --with-ppl=/home/gnu/gcc482/ --with-mpfr=/home/gnu/gcc482/ --with-mpc=/home/gnu/gcc482/ --enable-languages=c,c++,fortran CFLAGS='-O2 -mpowerpc -mno-mfcrf -mtune=power6' CPPFLAGS=-fexceptions CXXFLAGS='-O2 -mpowerpc -mno-mfcrf -mtune=power6 ' CPPFLAGS=-I/home/gnu/gcc482/include LDFLAGS=-L/home/gnu/gcc482/lib --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.9.2 (GCC)
作者: lwhjava    時(shí)間: 2016-04-19 22:11
salman_chan 發(fā)表于 2016-04-15 10:58
回復(fù) 3# lwhjava


線程本地存儲(chǔ)這個(gè)我還真不清楚。




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2