Comments (13)
Please try again following these instructions.
from qjson.
What exactly I'm missing from instructions? Do you mean these lines?
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=...
from qjson.
Just the
mkdir build; cd build
cmake ..
make
part
from qjson.
I tried this - got the same error. Here's full output:
vsapronov@vsapronov-HP-Z620:~/Projects/own/qjson$ git status
# On branch master
nothing to commit, working directory clean
vsapronov@vsapronov-HP-Z620:~/Projects/own/qjson$ mkdir build
vsapronov@vsapronov-HP-Z620:~/Projects/own/qjson$ cd build
vsapronov@vsapronov-HP-Z620:~/Projects/own/qjson/build$ cmake ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Qt5 found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vsapronov/Projects/own/qjson/build
vsapronov@vsapronov-HP-Z620:~/Projects/own/qjson/build$ make
Scanning dependencies of target qjson_automoc
[ 11%] Automoc for target qjson
Generating moc_parserrunnable.cpp
Generating moc_qobjecthelper.cpp
/home/vsapronov/Projects/own/qjson/src/qobjecthelper.h:0: Note: No relevant classes found. No output generated.
Generating moc_serializerrunnable.cpp
[ 11%] Built target qjson_automoc
Scanning dependencies of target qjson
[ 22%] Building CXX object src/CMakeFiles/qjson.dir/parser.cpp.o
[ 33%] Building CXX object src/CMakeFiles/qjson.dir/qobjecthelper.cpp.o
[ 44%] Building CXX object src/CMakeFiles/qjson.dir/json_scanner.cpp.o
[ 55%] Building CXX object src/CMakeFiles/qjson.dir/json_parser.cc.o
[ 66%] Building CXX object src/CMakeFiles/qjson.dir/parserrunnable.cpp.o
[ 77%] Building CXX object src/CMakeFiles/qjson.dir/serializer.cpp.o
[ 88%] Building CXX object src/CMakeFiles/qjson.dir/serializerrunnable.cpp.o
[100%] Building CXX object src/CMakeFiles/qjson.dir/qjson_automoc.cpp.o
Linking CXX shared library ../lib/libqjson.so
/usr/bin/ld: CMakeFiles/qjson.dir/parser.cpp.o: relocation R_X86_64_PC32 against symbol `_ZN5QJson13ParserPrivateC1Ev' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libqjson.so.0.8.1] Error 1
make[1]: *** [src/CMakeFiles/qjson.dir/all] Error 2
make: *** [all] Error 2
from qjson.
Ok, I see you are using Qt5.
Please provide the following details:
- which version of Qt5 have you installed?
- How did you install Qt5 (deb package from ppa)?
- Which version of Ubuntu are you running?
- What is your architecture?
from qjson.
I'm running Ubuntu 13.04 x64. Qt is 5.0.1. As I mentioned I installed Qt SDK through package-manager (ubuntu-sdk). I noticed you recommended this ppa in bug 19. This ppa now says the phrase below. That's why I'm using ubuntu-sdk package.
== Ubuntu 13.04 ==
The PPAs are not necessarily needed anymore but are recommended to be left enabled for future updates. Ubuntu SDK and Qt 5.0.1 are now part of the Ubuntu 13.04 release. Just install 'ubuntu-sdk' package!
from qjson.
Ok, I'll take a look at it using a virtual machine.
from qjson.
Please, take a look. I have tried on my both work and home machines. Both the same Ubuntu 13.04 x64 and the same Qt SDK package (ubuntu-sdk). Both giving the same error.
from qjson.
This is a nasty bug, I've been able to reproduce it but I need some time to fix it.
from qjson.
That version of compiller you have? (Ubuntu 13.xx seems to have gcc 4.7...)
I have like this error compiling other libs (written with qt5) with gcc < 4.8. Currently I am working on "some" shared library with qt5 and if I try compile one of my library with g++ 4.6 o 4.7 I get this error. But if I compile it with g++ 4.8 or clang 3.2, all works properly.
I tried to compile qjson with clang++ 3.2 or g++ 4.8 and compiles properly!
You can see compilation logs: http://dpaste.com/1208652/
This seems qt5 bug with "old compillers", not qjson bug.
Update: http://www.airs.com/blog/archives/307
from qjson.
Error is due to 'SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")'
(and it is not needed)
from qjson.
@shumski thanks a lot. That works.
Fixed with 2765c55
from qjson.
relocation R_X86_64_PC32 against symbol `ff_pw_9' can not be used when making a shared object; recompile with -fPIC
What should I do ?
from qjson.
Related Issues (20)
- Mac CMake
- Test failure: too large exponential: Number is out of range. HOT 4
- New release 0.9.1
- Build help: QJsonObject on Ubuntu 16.04 HOT 1
- Number is out of range: 19 HOT 1
- Add BOM support
- Non-stored Properties are included by QObjectHelper::qobject2qvariant
- Please review PR 107
- How can i do cmake with cross-compiler
- illegal number with scientific notation such as 1.79769313486232e+308
- 2/4 Test #2: testscanner ......................***Failed 0.01 sec [[email protected]] HOT 2
- Qt6 support HOT 3
- Encode String not behaving well with special characters.
- UTF8 QString parse problem
- Can you change the License to MIT? HOT 2
- Error compiling with Mingw 64 HOT 2
- Wrong indenting
- Request for Qt 5 release HOT 1
- CMake config depends on qtgui, while the library actually doesn't need it
- API/ABI changes review for QJson
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qjson.