Tesseract: [macos] unsupported argument '-q' to option 'Wa,'

Created on 20 Apr 2018  ·  12Comments  ·  Source: tesseract-ocr/tesseract

Installing master from source on MacOS fails with: __configure: error: Your compiler does not have the necessary c++11 support! Cannot proceed.__ Looking at config.log the actual problem is

configure:17144: result: no
configure:17149: checking whether compiler supports C++11
configure:17163: clang++ -c -g -O2 -Wa,-q -std=c++11  conftest.cpp >&5
clang: error: unsupported argument '-q' to option 'Wa,'

All 12 comments

See my comments for PR #1474 which introduced this regression.

@ic: The issue is still open after #1516.

@stweil, please send a PR that fix/revert those PRs.

@amitdo @stweil #1522 reverts the commits---sorry as I cannot handle the case more this week.

This is still an issue on the latest release of master, with Macports. Which is the last known working commit?

I'm trying to compile with the Xcode cc, but @ic's comments in the wiki have led to me trying to install with gcc from Macports

Don't use gcc, then latest code from git should work. And update the Wiki if it gives wrong advice.

@jmercouris Can you give more details? My comments on the wiki apply to building with g++, MacPorts packaging, and the Makefile. As far as I know, the main stream is to use CMake.

The recent changes I have tried for building with g++ with MacPorts and the Makefile worked at the time of my last changes (commit 4ded0d066e640e60e1640722860fc73d5838befb).

As this issue is closed and the main stream is on a different toolchain, feel free to get in touch directly (email?). Perhaps I can share more details on how I have it working here, and we can strengthen the wiki on this scenario.

Hi, sorry for the delay in replying! I used @stweil's advice and was able to get it to compile without complaint on MacOS. Apparently issues in my compiled version (4.0) were due to incompatible lang training data (from 3.5) rather than compilation issues.

As per why I posted in this thread, if you attempt to use cc that ships with Xcocde, and you do follow the wiki advice about the flags for g++ from macports, you'll see this error come up. My fault for not reading clearly.

Lastly, I did also attempt to compile with gcc7 from Macports, but it didn't work, and I don't have the log anymore. I hope that all made sense!

Great you could solve your problem.

Now I see the gcc and g++ issue. It turns out that the Xcode toolchain uses these names, but the actual tool is clang:

> /usr/bin/g++
clang: error: no input files

The wiki is really about the GNU tools, installed with MacPorts (but the problem would be the same with other packaging software). The fix for g++ uses a flag that clang does not know.

As for your last comment on trying gcc7, this is an open problem. You mentioned using master, and I guess it is way behind the commit hash I gave above. As the team focuses on CMake and clang, I guess the other build options will slowly fade away. Perhaps a good thing---a simpler sofware is easier to maintain and debug ;-) Apparently wrong understanding.

It would be great if you can update the wiki home page
https://github.com/tesseract-ocr/tesseract/wiki
for correct steps to be followed for building on macos

ShreeDevi


भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sat, Jun 2, 2018 at 7:07 PM, Eric Platon notifications@github.com
wrote:

Great you could solve your problem.

Now I see the gcc and g++ issue. It turns out that the Xcode toolchain
uses these names, but the actual tool is clang:

/usr/bin/g++
clang: error: no input files

The wiki is really about the GNU tools, installed with MacPorts (but the
problem would be the same with other packaging software). The fix for g++
uses a flag that clang does not know.

As for your last comment on trying gcc7, this is an open problem. You
mentioned using master, and I guess it is way behind the commit hash I
gave above. As the team focuses on CMake and clang, I guess the other
build options will slowly fade away. Perhaps a good thing---a simpler
sofware is easier to maintain and debug ;-)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tesseract-ocr/tesseract/issues/1500#issuecomment-394088246,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE2_o4z1gak1uA4pwK8vCpvoU8GdLJLfks5t4pU2gaJpZM4Td8v7
.

For Linux and macOS the mainstream build tool is the Autotools suite.

Was this page helpful?
0 / 5 - 0 ratings