Discussion:
[Moses-support] g++: error: unrecognized command line option '-no-cpp-precomp'
Jorg Tiedemann
2015-08-29 20:56:09 UTC
Permalink
Hi,

I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'

What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...

Thanks for your help!
Jörg
Hieu Hoang
2015-08-30 08:33:58 UTC
Permalink
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc

Hieu Hoang
Sent while bumping into things
Post by Jorg Tiedemann
Hi,
I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
Hieu Hoang
2015-08-31 13:19:40 UTC
Permalink
the errors for clang looks like it's coming from the stl library. Have
you fiddled with the PATH variable or otherwise tried to make gcc on OSX
work? You shouldn't do that, it will just mess up the compilation
environment on your machine
Unfortunately, this didn’t work for me either. I attach both logiles -
one for clang and one for gcc (which I installed via macports)
What can I do? Thanks!
Jörg
Post by Hieu Hoang
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Hi,
I tried to make a fresh install of Moses on my new Mac and I get
the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu
Jorg Tiedemann
2015-08-31 14:14:10 UTC
Permalink
Well, I have /opt/local/ search paths in various environment variables to get macports to work.
I deleted all this paths and tried again but I still get the same problem.

I am confused. And why is gcc not working anymore when installed via macports? I also installed boost with macports. Is that a problem as well?

I have also some problems with kenlm but part of it compiles and links fine. build_binary and query seems to compile fine but lmplz does not link because of some undefined symbols:
Undefined symbols for architecture x86_64:
"boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const", referenced from:

.

I also had to link /opt/local/lib to /opt/local/lib64 (which didn’t exist in my setup).
I am afraid that I started to make quite a mess on my system but what did I do wrong?

Is macports not working properly anymore?
As I said, I have gcc 5.2.0 and boost 1.59.0 via macports on my system. Is that bad?

Thanks for helping!
Jörg
the errors for clang looks like it's coming from the stl library. Have you fiddled with the PATH variable or otherwise tried to make gcc on OSX work? You shouldn't do that, it will just mess up the compilation environment on your machine
Unfortunately, this didn’t work for me either. I attach both logiles - one for clang and one for gcc (which I installed via macports)
What can I do? Thanks!
Jörg
Post by Hieu Hoang
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Hi,
I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu <http://www.hoang.co.uk/hieu>
Jeroen Vermeulen
2015-09-01 01:46:14 UTC
Permalink
Coming in with very little knowledge of the context here, but it looks to me as if you have a Boost that was built in a slightly different compiler configuration than the main program.

It looks as if maybe your Boost was built with a pre-5.x gcc, or without C++11 enabled.


Jeroen
Post by Jorg Tiedemann
Well, I have /opt/local/ search paths in various environment variables
to get macports to work.
I deleted all this paths and tried again but I still get the same problem.
I am confused. And why is gcc not working anymore when installed via
macports? I also installed boost with macports. Is that a problem as
well?
I have also some problems with kenlm but part of it compiles and links
fine. build_binary and query seems to compile fine but lmplz does not
"boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, bool)

.
I also had to link /opt/local/lib to /opt/local/lib64 (which didn’t exist in my setup).
I am afraid that I started to make quite a mess on my system but what did I do wrong?
Is macports not working properly anymore?
As I said, I have gcc 5.2.0 and boost 1.59.0 via macports on my system. Is that bad?
Thanks for helping!
Jörg
Post by Hieu Hoang
the errors for clang looks like it's coming from the stl library.
Have you fiddled with the PATH variable or otherwise tried to make gcc
on OSX work? You shouldn't do that, it will just mess up the
compilation environment on your machine
Post by Hieu Hoang
Unfortunately, this didn’t work for me either. I attach both logiles
- one for clang and one for gcc (which I installed via macports)
Post by Hieu Hoang
What can I do? Thanks!
Jörg
On 30 Aug 2015, at 11:33, Hieu Hoang <
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Hi,
I tried to make a fresh install of Moses on my new Mac and I get
the following error
Post by Hieu Hoang
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports
...
Post by Hieu Hoang
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
<http://mailman.mit.edu/mailman/listinfo/moses-support>
Post by Hieu Hoang
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
<http://mailman.mit.edu/mailman/listinfo/moses-support>
Post by Hieu Hoang
--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu <http://www.hoang.co.uk/hieu>
------------------------------------------------------------------------
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
Hieu Hoang
2015-09-01 12:21:33 UTC
Permalink
My advice on osx is don't install GCC. Clang is the ordained compiler now,
you'll be fighting apple every step of the way. Don't think different!

Hieu Hoang
Sent while bumping into things
Post by Jorg Tiedemann
Well, I have /opt/local/ search paths in various environment variables to
get macports to work.
I deleted all this paths and tried again but I still get the same problem.
I am confused. And why is gcc not working anymore when installed via
macports? I also installed boost with macports. Is that a problem as well?
I have also some problems with kenlm but part of it compiles and links
fine. build_binary and query seems to compile fine but lmplz does not link
"boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, bool) const",

.
I also had to link /opt/local/lib to /opt/local/lib64 (which didn’t exist
in my setup).
I am afraid that I started to make quite a mess on my system but what did I do wrong?
Is macports not working properly anymore?
As I said, I have gcc 5.2.0 and boost 1.59.0 via macports on my system. Is that bad?
Thanks for helping!
Jörg
the errors for clang looks like it's coming from the stl library. Have you
fiddled with the PATH variable or otherwise tried to make gcc on OSX work?
You shouldn't do that, it will just mess up the compilation environment on
your machine
Unfortunately, this didn’t work for me either. I attach both logiles - one
for clang and one for gcc (which I installed via macports)
What can I do? Thanks!
Jörg
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Post by Jorg Tiedemann
Hi,
I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
--
Hieu Hoang
Researcher
New York University, Abu Dhabihttp://www.hoang.co.uk/hieu
Jorg Tiedemann
2015-09-01 19:58:08 UTC
Permalink
This is kind of frustrating 
 so, the recommended way is to use apples clang and to built boost from source, is that correct?
I thought I could pull gcc and boost out of macpots (as I used to do) and they would understand each other, but this does not seem to work. Why not?

Well, thanks anyway. I will try with a fresh boost built ...
Jörg
My advice on osx is don't install GCC. Clang is the ordained compiler now, you'll be fighting apple every step of the way. Don't think different!
Hieu Hoang
Sent while bumping into things
Well, I have /opt/local/ search paths in various environment variables to get macports to work.
I deleted all this paths and tried again but I still get the same problem.
I am confused. And why is gcc not working anymore when installed via macports? I also installed boost with macports. Is that a problem as well?

.
I also had to link /opt/local/lib to /opt/local/lib64 (which didn’t exist in my setup).
I am afraid that I started to make quite a mess on my system but what did I do wrong?
Is macports not working properly anymore?
As I said, I have gcc 5.2.0 and boost 1.59.0 via macports on my system. Is that bad?
Thanks for helping!
Jörg
the errors for clang looks like it's coming from the stl library. Have you fiddled with the PATH variable or otherwise tried to make gcc on OSX work? You shouldn't do that, it will just mess up the compilation environment on your machine
Unfortunately, this didn’t work for me either. I attach both logiles - one for clang and one for gcc (which I installed via macports)
What can I do? Thanks!
Jörg
Post by Hieu Hoang
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Hi,
I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu <http://www.hoang.co.uk/hieu>
Matt Post
2015-09-01 20:19:18 UTC
Permalink
You do not need gcc; Apple's stock compiler (installed via Xcode) is fine. If you've installed it, I'd recommend uninstalling it, and if you can't, make sure that /opt/local/bin is last in your path, so that /usr/bin/gcc is found first.

I've also had a lot of trouble with the Macports boost installation, which uses the "--layout=tagged" argument to the boost installer, instead of the default "--layout=system". The difference is the tagged layout adds compile options to the library name (e.g., "-mt"). However, I think that Moses compilation tool figures this out.

matt
Post by Jorg Tiedemann
This is kind of frustrating 
 so, the recommended way is to use apples clang and to built boost from source, is that correct?
I thought I could pull gcc and boost out of macpots (as I used to do) and they would understand each other, but this does not seem to work. Why not?
Well, thanks anyway. I will try with a fresh boost built ...
Jörg
My advice on osx is don't install GCC. Clang is the ordained compiler now, you'll be fighting apple every step of the way. Don't think different!
Hieu Hoang
Sent while bumping into things
Well, I have /opt/local/ search paths in various environment variables to get macports to work.
I deleted all this paths and tried again but I still get the same problem.
I am confused. And why is gcc not working anymore when installed via macports? I also installed boost with macports. Is that a problem as well?

.
I also had to link /opt/local/lib to /opt/local/lib64 (which didn’t exist in my setup).
I am afraid that I started to make quite a mess on my system but what did I do wrong?
Is macports not working properly anymore?
As I said, I have gcc 5.2.0 and boost 1.59.0 via macports on my system. Is that bad?
Thanks for helping!
Jörg
the errors for clang looks like it's coming from the stl library. Have you fiddled with the PATH variable or otherwise tried to make gcc on OSX work? You shouldn't do that, it will just mess up the compilation environment on your machine
Unfortunately, this didn’t work for me either. I attach both logiles - one for clang and one for gcc (which I installed via macports)
What can I do? Thanks!
Jörg
Post by Hieu Hoang
Add
toolset=clang
to the bjam compile command. Osx no longer has gcc
Hieu Hoang
Sent while bumping into things
Hi,
I tried to make a fresh install of Moses on my new Mac and I get the following error
g++: error: unrecognized command line option '-no-cpp-precomp'
What’s wrong? I have gcc5 and boost 1.59 on my machine via macports ...
Thanks for your help!
Jörg
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support <http://mailman.mit.edu/mailman/listinfo/moses-support>
--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu <http://www.hoang.co.uk/hieu>
_______________________________________________
Moses-support mailing list
http://mailman.mit.edu/mailman/listinfo/moses-support
Loading...