I'm having a linker issue while using the tf library. Below is my callback. Without the only line in the callback there is no linker error. Please, find below the linker error itself.
void callback (const sensor_msgs::PointCloud2ConstPtr& input)
{
listener->waitForTransform("/world_base_link", (*input).header.frame_id, (*input).header.stamp, ros::Duration(5.0));
}
int main (int argc, char** argv)
{
ros::init(argc, argv, "subscriber");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("/kinect2/depth/points", 1, callback);
ros::spin ();
}
Linker error:
Linking CXX executable range_image_border_extraction
CMakeFiles/range_image_border_extraction.dir/range_image_border_extraction.cpp.o: In function `callback(boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&)':
range_image_border_extraction.cpp:(.text+0x18c): undefined reference to `tf::Transformer::waitForTransform(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::Time const&, ros::Duration const&, ros::Duration const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
collect2: ld returned 1 exit status
make[2]: *** [range_image_border_extraction] Error 1
make[1]: *** [CMakeFiles/range_image_border_extraction.dir/all] Error 2
make: *** [all] Error 2
CMakeLists.txt:
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(range_image_border_extraction)
find_package(PCL 1.7 REQUIRED)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(range_image_border_extraction range_image_border_extraction.cpp)
target_link_libraries(range_image_border_extraction ${PCL_LIBRARIES})
target_link_libraries(range_image_border_extraction ${catkin_LIBRARIES})
package.xml
<?xml version="1.0"?>
<package>
<name>ipa325_com_client</name>
<version>1.0.0</version>
<description>Simulation client side communication interface</description>
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>control_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>ipa325_msgs</build_depend>
<build_depend>ipa325_com_msgs</build_depend>
<build_depend>message_generation</build_depend>
<run_depend>tf</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>control_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>ipa325_com_msgs</run_depend>
<run_depend>ipa325_msgs</run_depend>
<run_depend>message_runtime</run_depend>
<export></export>
</package>
Any ideas how to resolve this linker error?
Related
I installed graphics.h library on my Ubuntu 19.04, and when I write some code in my CLion IDE, it successfully includes the graphics.h Header file, and also after writing some basic functions, the IDE doesn't show any errors, but when I compile the Code it gives Errors.
My Code:
#include <stdio.h>
#include <graphics.h>
int main() {
int gd = DETECT, gm;
detectgraph(&gd, &gm);
initgraph(&gd, &gm, NULL);
line(10, 10, 50, 50);
closegraph();
}
My CMakeList.txt File:
cmake_minimum_required(VERSION 3.14)
project(CGR_MP C)
set(CMAKE_C_STANDARD 11)
include_directories("//usr//local//lib//libgraph-1.0.2//")
build_command("lgraph")
add_executable(CGR_MP main.c)
Errors:
====================[ Build | CGR_MP | Debug ]==================================
/snap/clion/73/bin/cmake/linux/bin/cmake --build /home/prathamesh/Desktop/College/Sem-2/CGR-MP/cmake-build-debug --target CGR_MP -- -j 2
Scanning dependencies of target CGR_MP
[ 50%] Building C object CMakeFiles/CGR_MP.dir/main.c.o
[100%] Linking C executable CGR_MP
/usr/bin/ld: CMakeFiles/CGR_MP.dir/main.c.o: in function `main':
/home/prathamesh/Desktop/College/Sem-2/CGR-MP/main.c:7: undefined reference to `detectgraph'
/usr/bin/ld: /home/prathamesh/Desktop/College/Sem-2/CGR-MP/main.c:8: undefined reference to `initgraph'
/usr/bin/ld: /home/prathamesh/Desktop/College/Sem-2/CGR-MP/main.c:10: undefined reference to `line'
/usr/bin/ld: /home/prathamesh/Desktop/College/Sem-2/CGR-MP/main.c:12: undefined reference to `closegraph'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/CGR_MP.dir/build.make:84: CGR_MP] Error 1
make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/CGR_MP.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/CGR_MP.dir/rule] Error 2
make: *** [Makefile:118: CGR_MP] Error 2
Despite everything being successfully installed, it shows all Graphics functions as undefined reference
I'm trying call rrd func from my project in CLion (on ubuntu), rrd.h is in /usr/include/.
My code:
#include <stdio.h>
#include <rrd.h>
int main() {
size_t argc = 6;
char *argv[] = {
"test.rrd",
"--start",
"920804400",
"DS:speed:COUNTER:600:U:U",
"RRA:AVERAGE:0.5:1:24",
"RRA:AVERAGE:0.5:6:10"
};
rrd_create(argc, argv);
return 0;
}
CMakeLists.txt:
cmake_minimum_required(VERSION 3.8)
project(rddtool)
set(CMAKE_C_STANDARD 11)
set(SOURCE_FILES main.c /usr/include/rrd.h)
add_executable(rddtool ${SOURCE_FILES})
Messages Build:
Scanning dependencies of target rddtool
[ 50%] Building C object CMakeFiles/rddtool.dir/main.c.o
[100%] Linking C executable rddtool
CMakeFiles/rddtool.dir/main.c.o: In function `main':
/home/parallels/CLionProjects/rddtool/main.c:14: undefined reference to `rrd_create'
collect2: error: ld returned 1 exit status
CMakeFiles/rddtool.dir/build.make:94: recipe for target 'rddtool' failed
make[3]: *** [rddtool] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rddtool.dir/all' failed
make[2]: *** [CMakeFiles/rddtool.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/rddtool.dir/rule' failed
make[1]: *** [CMakeFiles/rddtool.dir/rule] Error 2
Makefile:118: recipe for target 'rddtool' failed
make: *** [rddtool] Error 2
How should I call rrd_create?
In CMakeLists.txt:
cmake_minimum_required(VERSION 3.8)
project(rddtool)
set(CMAKE_C_STANDARD 11)
set(SOURCE_FILES main.c)
find_library(RRD_LIBRARY librrd.so HINTS /usr/lib/x86_64-linux-gnu)
add_executable(rddtool ${SOURCE_FILES})
target_link_libraries(rddtool PUBLIC ${RRD_LIBRARY})
I've not written this program myself nor am I experienced with cygwin and linux but from what I can tell the file seems to have the right include:
// tsim_argp.c
#include <argp.h>
#include <stdlib.h>
#include <unistd.h> /* nice */
#include "tsim_argp.h"
argp.h which contains argp_usage also got limits.h included which contains INT_MAX so what exactly am I missing? I got all the other c-files compiling just fine it's just this last one that's causing problem.
make dialogue:
...
Making all in src
make[2]: Entering directory '/cygdrive/c/Users/David/Downloads/tsim-0.84/src'
gcc -DHAVE_CONFIG_H -I. -I.. -std=gnu99 -pedantic -Wall -Wextra -Wmissing-pro
totypes -DRESDIR=\"/c/Users/David/Downloads/Train_Simulator/share/tsim\" -g -O2
-MT tsim-tsim_argp.o -MD -MP -MF .deps/tsim-tsim_argp.Tpo -c -o tsim-tsim_argp.o
`test -f 'tsim_argp.c' || echo './'`tsim_argp.c
tsim_argp.c: In function 'setpriority':
tsim_argp.c:170:19: error: 'INT_MAX' undeclared (first use in this function)
if( priority == INT_MAX ) {
^
tsim_argp.c:170:19: note: each undeclared identifier is reported only once for e
ach function it appears in
...
Makefile:479: recipe for target 'tsim-tsim_argp.o' failed
make[2]: *** [tsim-tsim_argp.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/David/Downloads/tsim-0.84/src'
Makefile:247: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/David/Downloads/tsim-0.84'
Makefile:169: recipe for target 'all' failed
make: *** [all] Error 2
make dialogue if I include the limits.h library directly in tsim_argp:
...
Making all in src
make[2]: Entering directory '/cygdrive/c/Users/David/Downloads/tsim-0.84/src'
gcc -std=gnu99 -pedantic -Wall -Wextra -Wmissing-prototypes -DRESDIR=\"/c/Users/
David/Downloads/Train_Simulator/share/tsim\" -g -O2 -L/usr/X11R6/lib -lXaw -lXt
-lXmu -lX11 -lXext -o tsim.exe tsim-AddToggleWidget.o tsim-DialogPopup.o tsim-f
ile.o tsim-resources.o tsim-timer.o tsim-tsim.o tsim-bitmap.o tsim-DrawingPalett
e.o tsim-Graph.o tsim-sound.o tsim-train.o tsim-BitmapDirectory.o tsim-errcheck.
o tsim-pipe.o tsim-Sprite.o tsim-tsim_argp.o -lXt -lXmu -lXext -lXaw -lX11
tsim-tsim_argp.o: In function `parse_opt':
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:113: undefined refer
ence to `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:113:(.text+0xbe): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:83: undefined refere
nce to `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:83:(.text+0x10e): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:98: undefined refere
nce to `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:98:(.text+0x15c): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:68: undefined refere
nce to `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:68:(.text+0x1a3): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:118: undefined refer
ence to `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:118:(.text+0x294): r
elocation truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
tsim-tsim_argp.o:/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:103
: more undefined references to `argp_usage' follow
tsim-tsim_argp.o: In function `parse_opt':
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:103:(.text+0x2c4): r
elocation truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:73:(.text+0x2f4): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:88:(.text+0x324): re
location truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:127:(.text+0x354): r
elocation truncated to fit: R_X86_64_PC32 against undefined symbol `argp_usage'
tsim-tsim_argp.o: In function `parse':
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:234: undefined refer
ence to `argp_parse'
/cygdrive/c/Users/David/Downloads/tsim-0.84/src/tsim_argp.c:234:(.text+0x429): r
elocation truncated to fit: R_X86_64_PC32 against undefined symbol `argp_parse'
collect2: error: ld returned 1 exit status
Makefile:228: recipe for target 'tsim.exe' failed
make[2]: *** [tsim.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/David/Downloads/tsim-0.84/src'
Makefile:247: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/David/Downloads/tsim-0.84'
Makefile:169: recipe for target 'all' failed
make: *** [all] Error 2
In Cygwin, it looks like argp is separate library. You'll need to add: -largp to your gcc line.
I'm trying to install libstdcxx using macports, and I keep running into errors but I'm not sure what's causing them.
I'm working on a machine running Mac OS X Server 10.4.11. I'm not sure what version of Xcode is installed, but I worked out the component versions are DevToolsCore-798.0 and DevToolsSupport-794.0. I'm also working with macports running in a virtualenv (macports configured with prefix=/cluster/plaw/regenv/ ). I've used macports in a virtualenv before without problems.
I discovered here that there are sometimes problems with libstdcxx due to problems with ld64. I've followed most of the suggested solutions (reinstalling ld64, using ld64+llvm31, installing in different orders, etc), but to no avail.
I also found a similar problem here, but the ticket is unresolved.
So, I'm wondering if it's just a matter of the old OS, and there's nothing I can do about it (the sysadmin is unwilling to update). Below is a part of the install log, if someone can spot what may be causing the problem.
These are the ports I have installed (if it makes a difference)
apple-gcc42 #5666.3_10+bootstrap (active)
autoconf #2.69_0 (active)
automake #1.13.1_0 (active)
bzip2 #1.0.6_0 (active)
cctools #806_2 (active)
cctools-headers #836_0 (active)
cloog #0.17.0_1 (active)
db46 #4.6.21_7 (active)
dyld-headers #210.2.3_0 (active)
expat #2.1.0_0 (active)
gcc_select #0.1_7 (active)
gdbm #1.10_2 (active)
gettext #0.18.2_0 (active)
glpk #4.47_0 (active)
gmake #3.82_0 (active)
gmp #5.0.5_0 (active)
gperf #3.0.4_2 (active)
help2man #1.40.13_0 (active)
isl #0.10_1 (active)
ld64 #97.17_2+llvm31 (active)
libedit #20121213-3.0_0 (active)
libffi #3.0.11_1 (active)
libiconv #1.14_0 (active)
libmpc #1.0.1_0 (active)
libtool #2.4.2_3 (active)
libunwind-headers #35.1_0 (active)
llvm-3.1 #3.1_6 (active)
llvm_select #0.2_0 (active)
m4 #1.4.16_0 (active)
mpfr #3.1.1-p2_0 (active)
ncurses #5.9_1 (active)
openssl #1.0.1c_0 (active)
p5.12-locale-gettext #1.50.0_7 (active)
perl5 #5.12.4_0+perl5_12 (active)
perl5.12 #5.12.4_1 (active)
ppl #1.0_0 (active)
python27 #2.7.3_1 (active)
python_select #0.3_2 (active)
sqlite3 #3.7.15.2_0 (active)
xz #5.0.4_0 (active)
zlib #1.2.7_0 (active)
Output from the install log:
:info:build /usr/bin/gcc-4.0 -arch i386 -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -Wold-style-definition -fno-common -DHAVE_CONFIG_H -L/cluster/plaw/regenv/lib -o cc1plus \
:info:build cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o darwin-c.o cc1plus-checksum.o main.o tree-browser.o libbackend.a libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/cluster/plaw/regenv/lib -lcloog-isl -lisl -L/cluster/plaw/regenv/lib -lppl_c -lppl -lgmpxx -L/cluster/plaw/regenv/lib -L/cluster/plaw/regenv/lib -L/cluster/plaw/regenv/lib -lmpc -lmpfr -lgmp -lz
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
:info:build typeinfo for std::logic_error
:info:build typeinfo for std::runtime_error
:info:build typeinfo for std::basic_streambuf<char, std::char_traits<char> >
:info:build typeinfo for std::bad_alloc
:info:build typeinfo for std::exception
:info:build typeinfo for int
:info:build VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_istream<char, std::char_traits<char> >
:info:build vtable for std::basic_ostream<char, std::char_traits<char> >
:info:build vtable for std::basic_streambuf<char, std::char_traits<char> >
:info:build vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ios<char, std::char_traits<char> >
:info:build operator delete(void*)
:info:build operator new(unsigned long)
:info:build operator delete[](void*)
:info:build operator new[](unsigned long)
:info:build symbol ___gmpz_neg used from dynamic library /cluster/plaw/regenv/lib/libgmp.dylib(single module) not from earlier dynamic library /cluster/plaw/regenv/lib/libppl_c.4.dylib(single module)
:info:build collect2: ld returned 1 exit status
:info:build make[3]: *** [lto1] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
:info:build typeinfo for std::logic_error
:info:build typeinfo for std::runtime_error
:info:build typeinfo for std::basic_streambuf<char, std::char_traits<char> >
:info:build typeinfo for std::bad_alloc
:info:build typeinfo for std::exception
:info:build typeinfo for int
:info:build VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_istream<char, std::char_traits<char> >
:info:build vtable for std::basic_ostream<char, std::char_traits<char> >
:info:build vtable for std::basic_streambuf<char, std::char_traits<char> >
:info:build vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ios<char, std::char_traits<char> >
:info:build operator delete(void*)
:info:build operator new(unsigned long)
:info:build operator delete[](void*)
:info:build operator new[](unsigned long)
:info:build symbol ___gmpz_neg used from dynamic library /cluster/plaw/regenv/lib/libgmp.dylib(single module) not from earlier dynamic library /cluster/plaw/regenv/lib/libppl_c.4.dylib(single module)
:info:build collect2: ld returned 1 exit status
:info:build make[3]: *** [cc1] Error 1
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
:info:build typeinfo for std::logic_error
:info:build typeinfo for std::runtime_error
:info:build typeinfo for std::basic_streambuf<char, std::char_traits<char> >
:info:build typeinfo for std::bad_alloc
:info:build typeinfo for std::exception
:info:build typeinfo for int
:info:build VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_istream<char, std::char_traits<char> >
:info:build vtable for std::basic_ostream<char, std::char_traits<char> >
:info:build vtable for std::basic_streambuf<char, std::char_traits<char> >
:info:build vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >
:info:build vtable for std::basic_ios<char, std::char_traits<char> >
:info:build operator delete(void*)
:info:build operator new(unsigned long)
:info:build operator delete[](void*)
:info:build operator new[](unsigned long)
:info:build symbol ___gmpz_neg used from dynamic library /cluster/plaw/regenv/lib/libgmp.dylib(single module) not from earlier dynamic library /cluster/plaw/regenv/lib/libppl_c.4.dylib(single module)
:info:build collect2: ld returned 1 exit status
:info:build make[3]: *** [cc1plus] Error 1
:info:build make[2]: *** [all-stage1-gcc] Error 2
:info:build make[2]: Leaving directory `/Volumes/cluster/plaw/regenv/var/macports/build/_cluster_plaw_regenv_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build'
:info:build make[1]: *** [stage1-bubble] Error 2
:info:build make[1]: Leaving directory `/Volumes/cluster/plaw/regenv/var/macports/build/_cluster_plaw_regenv_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build'
:info:build make: *** [bootstrap] Error 2
:info:build make: Leaving directory `/Volumes/cluster/plaw/regenv/var/macports/build/_cluster_plaw_regenv_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build'
:info:build Command failed: cd "/cluster/plaw/regenv/var/macports/build/_cluster_plaw_regenv_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/libstdcxx/work/build" && /usr/bin/make -j4 -w bootstrap
:info:build Exit code: 2
:error:build org.macports.build for port libstdcxx returned: command execution failed
:debug:build Error code: CHILDSTATUS 864 2
:debug:build Backtrace: command execution failed
while executing
"system -nice 0 $fullcmdstring"
("eval" body line 1)
invoked from within
"eval system $notty $nice \$fullcmdstring"
invoked from within
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for libstdcxx: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Looks like a conflict between gmp and ppl, unless you need the graphite optimisations (you probably don't) and unless Macports insists on enabling them, you could try removing the ppl package and reinstalling.
I really like playing with the Alchemy API REST api and have tried the php sdk but am trying to compile the API and keep getting a very bizarre issue when I try to do a make.
This is when trying to compile on an Ubuntu instance on AWS EC2 using the Bitnami AMI.
Here's the output:
libtool: link: g++ -g -O2 -o .libs/keywordspp keywordspp.o ../src/.libs/libalchemyapi.so -L/opt/bitnami/common/lib /opt/bitnami/common/lib/libxml2.so -lz /opt/bitnami/common/lib/libiconv.so -lm /opt/bitnami/common/lib/libcurl.so -Wl,-rpath -Wl,/opt/bitnami/common/lib
keywordspp.o: In function `operator<< <char, std::char_traits<char>, std::allocator<char> >':
/usr/include/c++/4.4/bits/basic_string.h:2506: 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*, int)'
keywordspp.o: In function `operator<< <std::char_traits<char> >':
/usr/include/c++/4.4/ostream:510: 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*, int)'
keywordspp.o: In function `operator<< <char, std::char_traits<char>, std::allocator<char> >':
/usr/include/c++/4.4/bits/basic_string.h:2506: 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*, int)'
collect2: ld returned 1 exit status
make[1]: *** [keywordspp] Error 1
Setting LDFLAGS=-L/usr/lib/gcc/x86_64-linux-gnu/4.4 before running configure should make it works.
$ ./autobuild.sh
$ export LDFLAGS=-L/usr/lib/gcc/x86_64-linux-gnu/4.4
$ ./configure
$ make