源码编译wxWidgets生成共享库时发生错误,ld:致命的:relocation error:R_386_GOTOFF

jingwabuyutian 2017-08-08 01:48:42
1
#./configure --enable-xrc --enable-unicode
2.编译
# make
g++ -shared -fPIC -o /export/wxWidgets-3.0.3/build/lib/libwx_baseu-3.0.so.0 basedll_any.o basedll_appbase.o basedll_arcall.o basedll_arcfind.o basedll_archive.o basedll_arrstr.o basedll_base64.o basedll_clntdata.o basedll_cmdline.o basedll_config.o basedll_convauto.o basedll_datetime.o basedll_datetimefmt.o basedll_datstrm.o basedll_dircmn.o basedll_dynarray.o basedll_dynlib.o basedll_dynload.o basedll_encconv.o basedll_evtloopcmn.o basedll_extended.o basedll_ffile.o basedll_file.o basedll_fileback.o basedll_fileconf.o basedll_filefn.o basedll_filename.o basedll_filesys.o basedll_filtall.o basedll_filtfind.o basedll_fmapbase.o basedll_fs_arc.o basedll_fs_filter.o basedll_hash.o basedll_hashmap.o basedll_init.o basedll_intl.o basedll_ipcbase.o basedll_languageinfo.o basedll_list.o basedll_log.o basedll_longlong.o basedll_memory.o basedll_mimecmn.o basedll_module.o basedll_mstream.o basedll_numformatter.o basedll_object.o basedll_platinfo.o basedll_powercmn.o basedll_process.o basedll_regex.o basedll_stdpbase.o basedll_sstream.o basedll_stdstream.o basedll_stopwatch.o basedll_strconv.o basedll_stream.o basedll_string.o basedll_stringimpl.o basedll_stringops.o basedll_strvararg.o basedll_sysopt.o basedll_tarstrm.o basedll_textbuf.o basedll_textfile.o basedll_threadinfo.o basedll_common_time.o basedll_timercmn.o basedll_timerimpl.o basedll_tokenzr.o basedll_translation.o basedll_txtstrm.o basedll_unichar.o basedll_uri.o basedll_ustring.o basedll_variant.o basedll_wfstream.o basedll_wxcrt.o basedll_wxprintf.o basedll_xlocale.o basedll_xti.o basedll_xtistrm.o basedll_zipstrm.o basedll_zstream.o basedll_fswatchercmn.o basedll_fswatcherg.o basedll_fdiodispatcher.o basedll_selectdispatcher.o basedll_appunix.o basedll_unix_dir.o basedll_dlunix.o basedll_epolldispatcher.o basedll_evtloopunix.o basedll_fdiounix.o basedll_unix_snglinst.o basedll_unix_stackwalk.o basedll_unix_stdpaths.o basedll_timerunx.o basedll_threadpsx.o basedll_utilsunx.o basedll_wakeuppipe.o basedll_fswatcher_kqueue.o basedll_unix_mimetype.o basedll_fswatcher_inotify.o basedll_event.o basedll_fs_mem.o basedll_msgout.o basedll_utilscmn.o -L/export/wxWidgets-3.0.3/build/lib -hlibwx_baseu-3.0.so.0 -pthreads -lwxregexu-3.0 -lwxexpat-3.0 -pthreads -lz -lposix4 -lnsl -lsocket -lm -lz -lposix4 -lnsl -lsocket -lm
ld: 致命的: relocation error: R_386_GOTOFF: file basedll_any.o: symbol wxAnyValueTypeGlobalsManager::ms_classInfo: a GOT relative relocation must reference a local symbol
ld: 致命的: relocation error: R_386_GOTOFF: file basedll_any.o: symbol vtable for wxAnyValueTypeGlobalsManager: a GOT relative relocation must reference a local symbol
ld: 致命的: relocation error: R_386_GOTOFF: file basedll_any.o: symbol wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable::GetBucketForNode(wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable*, wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable::Node*): a GOT relative relocation must reference a local symbol
ld: 致命的: relocation error: R_386_GOTOFF: file basedll_any.o: symbol wxAnyValueTypeImpl<wxVariant>::sm_instance: a GOT relative relocation must reference a local symbol
ld: 致命的: relocation error: R_386_GOTOFF: file basedll_any.o: symbol wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable::GetBucketForNode(wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable*, wxAnyTypeToVariantDataFactoryMap_wxImplementation_HashTable::Node*): a GOT relative relocation must reference a local symbol
collect2: 错误:ld 返回 1
*** Error code 1
make: Fatal error: Command failed for target `/export/wxWidgets-3.0.3/build/lib/libwx_baseu-3.0.so.0'
//系统是Solaris10
//下载使用的是wxWidgets-3.0.3.tar.bz2
//编译静态库时不报错(加--disable-shared)
求大神帮忙解决这个问题。。。
...全文
1057 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jingwabuyutian 2017-08-14
  • 打赏
  • 举报
回复
我用的不是centos,而是solairs,一种Unix操作系统。centos安装比较简单。
jklinux 2017-08-09
  • 打赏
  • 举报
回复
我从这里下载: https://github.com/wxWidgets/wxWidgets 在centos7上编译没报错哦

1,543

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 Solaris
社区管理员
  • Solaris
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧