question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OS X: tests failing with "unrecognized command line option"

See original GitHub issue

I’m running OS X, El Capitan (10.11.5) with MacPorts. Installed Tensorflow a couple months ago.

Tonight I installed bazel via the binary installer. Then ran…

bash-3.2$ bazel test //magenta:all
WARNING: /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/WORKSPACE:1: Workspace name in /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/WORKSPACE (@__main__) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
INFO: Found 9 targets and 6 test targets...
ERROR: /private/var/tmp/_bazel_myusername/ddd9d9dc1e025ace939596b3e248324a/external/protobuf/BUILD:228:1: C++ compilation of rule '@protobuf//:protoc_lib' failed: cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wthread-safety -Wself-assign -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ... (remaining 36 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
cc1plus: error: unrecognized command line option "-Wthread-safety"
cc1plus: error: unrecognized command line option "-Wself-assign"
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
INFO: Elapsed time: 4.480s, Critical Path: 1.87s
//magenta:basic_one_hot_encoder_test                                  NO STATUS
//magenta:convert_midi_dir_to_note_sequences_test                     NO STATUS
//magenta:melodies_lib_test                                           NO STATUS
//magenta:midi_io_test                                                NO STATUS
//magenta:note_sequence_io_test                                       NO STATUS
//magenta:sequence_to_melodies_test                                   NO STATUS

Executed 0 out of 6 tests: 6 were skipped.
bash-3.2$ 

Any suggestions? Perhaps it’s some kind of compiler mismatch? Usually, build scripts will pull from the environment to use the MacPorts compilers, but the default ‘gcc’ just points to Apple’s…

bash-3.2$ which gcc
/Applications/XCode.app/Contents/Developer/usr/bin/gcc
bash-3.2$ set | grep CC
CC=/opt/local/bin/gcc-mp-4.4
bash-3.2$ set | grep CXX
CXX=/opt/local/bin/g++-mp-4.4

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
drscotthawleycommented, Jun 27, 2016

% python --version Python 2.7.11

0reactions
drscotthawleycommented, Jul 26, 2016

Sorry, my laptop died recently and I’m just getting going again on a new one. Did not get it solved, with MacPorts, however with the new laptop I’m trying HomeBrew instead, and got the tests to pass.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tests fail with 'unrecognized command line option'
Hi. I'm unable to run the tests. I already had TensorFlow installed. Tonight I installed bazel via then binary installer, on Mac OS...
Read more >
OS X + gcc (was: Node-gyp rebuild error) #294 - GitHub
Hi Bruno, "Darwin 15.0.0" tells me you're using OS X 10.11, for which sharp assumes xcode/clang is being used rather than gcc. Are...
Read more >
unrecognized command line option '-stdlib=libc++' gcc ...
As the error message says, the gcc compiler has no such commandline option as -stdlib . The LLVM clang compiler does.
Read more >
59832 (cmake 3.16.0: does not build on PPC Mac OS X 10.5.8 ...
Building cmake fails with an apparent bus error at: :info:configure cmake(21293) malloc: *** error for object 0xa01be3dc: Non-aligned pointer being freed ...
Read more >
unrecognized command line option -fstack-protector-strong
Hello, Trying to upgrade bioconductor hit a problem with vsn. gcc: error: unrecognized command line option -fstack-protector-strong. It seems that "fstack- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found