GithubHelp home page GithubHelp logo

Comments (13)

flavio avatar flavio commented on August 27, 2024

Please try again following these instructions.

from qjson.

vsapronov avatar vsapronov commented on August 27, 2024

What exactly I'm missing from instructions? Do you mean these lines?

    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=...

from qjson.

flavio avatar flavio commented on August 27, 2024

Just the

mkdir build; cd build
cmake ..
make

part

from qjson.

vsapronov avatar vsapronov commented on August 27, 2024

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.

flavio avatar flavio commented on August 27, 2024

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.

vsapronov avatar vsapronov commented on August 27, 2024

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.

flavio avatar flavio commented on August 27, 2024

Ok, I'll take a look at it using a virtual machine.

from qjson.

vsapronov avatar vsapronov commented on August 27, 2024

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.

flavio avatar flavio commented on August 27, 2024

This is a nasty bug, I've been able to reproduce it but I need some time to fix it.

from qjson.

niwinz avatar niwinz commented on August 27, 2024

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.

shumski avatar shumski commented on August 27, 2024

Error is due to 'SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")'
(and it is not needed)

from qjson.

flavio avatar flavio commented on August 27, 2024

@shumski thanks a lot. That works.

Fixed with 2765c55

from qjson.

JackZ0 avatar JackZ0 commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.