Failing when linking...

61 views
Skip to first unread message

Glenn O Larsen

unread,
Sep 20, 2011, 2:10:05 AM9/20/11
to HipHop for PHP Dev
Hi guys,

I have a problem when linking the objects...
I'm not sure whats causing this, any idea where to start looking..?

[snip]
Linking CXX executable program
/usr/lib64/hphp/bin/libhphp_runtime.a(program_functions.cpp.o): In
function `HPHP::translate_stack(char const*,
bool)':
(.text+0x4a3c): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::__ostream_insert<char,
std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&, char const*, long)'
/usr/lib64/hphp/bin/libhphp_runtime.a(program_functions.cpp.o): In
function `HPHP::translate_stack(char const*, bool)':
(.text+0x4a52): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::__ostream_insert<char,
std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&, char const*, long)'
/usr/lib64/hphp/bin/libhphp_runtime.a(program_functions.cpp.o): In
function `HPHP::translate_stack(char const*, bool)':
(.text+0x4a5d): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::basic_ostream<char,
std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)'
/usr/lib64/hphp/bin/libhphp_runtime.a(program_functions.cpp.o): In
function `HPHP::translate_stack(char const*, bool)':
(.text+0x4a71): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::__ostream_insert<char,
std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&, char const*, long)'
...
...
[/snip]

--
Glenn

Mike Dupont

unread,
Sep 24, 2011, 6:46:23 AM9/24/11
to hiphop-...@googlegroups.com
hi
this is a simple error,

you are looking to link in your libstdc++
libstdc++.so.6

add this to your link libs -lstdc++

see also http://stackoverflow.com/questions/4931693/build-plugin-with-cmake

mike
--
James Michael DuPont
Member of Free Libre Open Source Software Kosova http://flossk.org

Glenn O Larsen

unread,
Oct 7, 2011, 12:56:21 AM10/7/11
to HipHop for PHP Dev
Hi,

When I added -lstdc++ to the file CMakeFiles/program.dir/link.txt, and
executed this one, the linking was correct.
Thank you!

What I don't understand, is why cmake does not add this option to the
link file itself, but then again, I'm not a cmake expert.

On Sep 24, 12:46 pm, Mike Dupont <jamesmikedup...@googlemail.com>
wrote:
> hi
> this is a simple error,
>
> you are looking to link in your libstdc++
> libstdc++.so.6
>
> add this to your link libs -lstdc++
>
> see alsohttp://stackoverflow.com/questions/4931693/build-plugin-with-cmake
>

--
Glenn

Mike Dupont

unread,
Oct 7, 2011, 7:37:56 AM10/7/11
to hiphop-...@googlegroups.com
I dont know your setup, but I did not have to do this. It seems to be a local problem. 
mike
Reply all
Reply to author
Forward
0 new messages