0

I'm tring to compile some ACE lib within my project with PCH support and including only sources that i need

I'm on ubuntu 16.04 and i need to use clang

but i've this error:

error: PIC level differs in PCH file vs. current file

I've prepared a MVCE, you need clang installed ofc, then just run following commands:

git clone https://github.com/Yehonal/ace-clang-test.git
cd ace-clang-test
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CC_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ..
make -j 4

How can i solve it?

EDIT: in repository linked above i've only created CMakeLists.txt and PCHSupport.cmake files, others are original sources from ACE lib

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
Joseph
  • 1,029
  • 13
  • 26
  • MVCE is in the question, not an external source. And provide the complete error message. Where does the PIC come from? BTW, CMAKE_CC_COMPILER does not exist. – usr1234567 Aug 18 '16 at 14:24
  • what do you mean with "MVCE is in the question"? however the __PIC__ error is on all .cpp ACE sources compiled – Joseph Aug 18 '16 at 14:58
  • Sorry, I missed some words. An MVCE should be posted as part of the message, no external source. The github might vanish, then is the question useless. Do you think PIC comes from ACE? What is ACE? – usr1234567 Aug 18 '16 at 15:10
  • 3
    well i cannot post 100MB of source code on question sorry. ACE is a toolkit for c++ http://www.cs.wustl.edu/~schmidt/ACE.html – Joseph Aug 18 '16 at 15:21
  • And we should scan 100 MB to find the error? You have to reduce the problem. That's the M in MVCE, it should be minimal. – usr1234567 Aug 18 '16 at 15:25
  • Sorry but if the ACE library is about 100MB is not my fault, maybe should reply here someone that already know ACE library or at least that error above – Joseph Aug 18 '16 at 15:33

0 Answers0