heweitykc / liteide

Automatically exported from code.google.com/p/liteide
0 stars 0 forks source link

Undefined symbol for QJson #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run build/build_linux.sh
2. try liteide
3. liteide: symbol lookup error: /usr/lib/liteide/plugins/libgolangdoc.so: 
undefined symbol:QJson::Parser::Parser()

What version of the product are you using? On what operating system?
liteide tag: x14.1
System: Arch Linux (x86_64)

I ran into this while trying to package liteide for Arch Linux to put in the 
User Repository (for now I'm just going to patch it to use the system qjson.) 
It would appear that the symbols aren't being linked into ibgolangdoc.so 
correctly. 

Here's the command linking libgolangdoc.so:
g++ -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-z,origin 
'-Wl,-rpath,$ORIGIN:$ORIGIN/..:$ORIGIN/../..' -Wl,-O1 -shared 
-Wl,-soname,libgolangdoc.so -o libgolangdoc.so 
.obj/release-shared/golangdocplugin.o .obj/release-shared/golangdoc.o 
.obj/release-shared/golangdocoptionfactory.o 
.obj/release-shared/golangdocoption.o .obj/release-shared/moc_golangdocplugin.o 
.obj/release-shared/moc_golangdoc.o .obj/release-shared/moc_golangdocoption.o   
-L/usr/lib -lliteapi 
-L/home/harley/Source/aur/liteide/src/liteide-test/liteidex/liteide/lib/liteide/
plugins 
-L/home/harley/Source/aur/liteide/src/liteide-test/liteidex/liteide/lib/liteide 
-lgolangdocapi -lliteeditorapi -ldocumentbrowser -lextension -ldocbrowserapi 
-lfileutil -lprocessex -lhtmlutil -lgolangapi -lqtc_editutil -ljson -lQtXml 
-lQtGui -lQtCore -lpthread

and here's what nm gives for libgolangdoc.so
nm libgolangdoc.so | c++filt| grep Json
                 U QJson::Parser::parse(QByteArray const&, bool*)
                 U QJson::Parser::Parser()
                 U QJson::Parser::~Parser()

I couldn't figure out a way to get the symbols recognized with the statically 
linked qjson library from 3rdparty. I could however change it to use the system 
qjson shared library and that works. 

Attached is the full build log as well.

Original issue reported on code.google.com by losinggeneration on 26 Nov 2012 at 7:40

Attachments:

GoogleCodeExporter commented 8 years ago
fixed source dep

Original comment by Visua...@gmail.com on 17 Dec 2012 at 12:46

GoogleCodeExporter commented 8 years ago

Original comment by Visua...@gmail.com on 17 Dec 2012 at 12:47