Menu

#19 cannot use 'precompiled-header' output with multiple -arch options

v1.15
open
nobody
None
5
2020-07-07
2020-07-07
No

When I try to compile rsyncrypto 1.14 on macOS 10.13 with these environment variables set:

CPPFLAGS='-I/opt/local/include'
CXX='/usr/bin/clang++'
CXXFLAGS='-pipe -Os -stdlib=libc++ -arch x86_64 -arch i386'

(using multiple -arch flags in order to build universally) it fails right away with:

/usr/bin/clang++ -DHAVE_CONFIG_H -I.   -I/opt/local/include  -pipe -Os -stdlib=libc++ -arch x86_64 -arch i386 -MT precomp.h.gch -MD -MP -MF .deps/.h.Tpo -c -o precomp.h.gch.comp precomp.h
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: error: cannot use 'precompiled-header' output with multiple -arch options

When using a single -arch flag (or no -arch flags to get the default architecture) this doesn't happen.

Discussion

  • Shachar Shemesh

    Shachar Shemesh - 2020-07-07

    It seems from the error message that you are trying to build with compile flags that are not supported by clang. I fail to see how I can fix this issue.

     
  • Shachar Shemesh

    Shachar Shemesh - 2020-07-07

    I think I better understand the problem you are describing. You are saying that rsyncrypto's use of precompiled headers conflicts with clang's multiarch support. Is that correct?

     
  • Ryan Carsten Schmidt

    I think this issue may end up being solved once #21 is solved.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.