[CLN-list] CLN on OS X, linking problem

Ralf Wildenhues Ralf.Wildenhues at gmx.de
Tue Mar 15 07:44:36 CET 2005


* Ron Garret wrote on Mon, Mar 14, 2005 at 07:09:33PM CET:
> On Mar 14, 2005, at 12:29 AM, Ralf Wildenhues wrote:
> >* Ron Garret wrote on Fri, Mar 11, 2005 at 09:27:22PM CET:
> >>Finally got CLN to compile.  Whew!  But make check gives me this:
> >
> >>dyld: /Users/ron/devel/cln-1.1.9/tests/.libs/exam Undefined symbols:
> >>___gxx_personality_v0
> >>__ZNSt8ios_base4InitC1Ev
*snip*
> 
> >  I don't know much
> >about OS X, but quite a bit of darwin-related changes went into Libtool
> >not too long ago.  It might help to update ltmain.sh and libtool.m4.
> >
> >But then again, I know cln uses some modified version of libtool, so
> >I don't know whether anything would break.
> 
> Me neither, but this does seem to be a likely source of the problem.  
> The usual cause of this symptom is trying to link C++ code using gcc 
> rather than g++.  But I don't know the ins and outs of libtool.  Need 
> to find some time to read through the docs.  I'm a little surprised 
> that this is not a solved problem though.  Surely I'm not the first 
> person to have encountered this?

Oh well. It never occurred to me that cln uses $CC to link a C++
library, not $CXX.  Automake usually fins this out for you, but cln does
not use Automake.

Please try the trivial patch below.  Still, Richard please consider
updating libtool.

Regards,
Ralf

--- src/Makefile.in	3 Nov 2004 20:58:50 -0000	1.14
+++ src/Makefile.in	15 Mar 2005 06:48:32 -0000
@@ -203,7 +203,7 @@
 $(ALLOBJECTS_LO) : $(SUBDIRS_TARGET)
 
 libcln.la : $(LIBTOOL) $(ALLOBJECTS_LO)
-	$(LIBTOOL_LINK) $(CC) -o libcln.la -rpath $(libdir) -version-info $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) $(LDFLAGS) $(LIBS) $(ALLOBJECTS_LO)
+	$(LIBTOOL_LINK) $(CXX) -o libcln.la -rpath $(libdir) -version-info $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) $(LDFLAGS) $(LIBS) $(ALLOBJECTS_LO)
 
 install : all force
 	$(MKDIR) $(DESTDIR)$(libdir)




More information about the CLN-list mailing list