configure script linker option for FreeBSD

John W. Eaton jwe at bevo.che.wisc.edu
Fri Feb 15 14:39:53 CST 2008


On 15-Feb-2008, Ryan Hinton wrote:

| When installing Octave from FreeBSD ports (6.3-STABLE), I had to modify 
| the configure script (actually configure.in) to fix a bunch of linker 
| warnings in liboctinterp.so. Specifically, I had to ask for linking 
| (SH_LD) to be done with the C++ compiler instead of the C compiler. The 
| FreeBSD port maintainer added my patch to the port, and I'm running fine 
| now.
| 
| I noticed, though, that the change is in a FreeBSD-specific area of the 
| configure script, I wanted to raise the issue here to potentially fix 
| the problem at its source. On the other hand, I someone added this 
| FreeBSD-specific code to fix a problem in the past. I don't have the CVS 
| repository since I'm working from a port, so I'm not sure when or why or 
| if it is still necessary for some people.
| 
| Here is the patch I used that fixes my problem.
| 
| --- configure.in~ 2008-02-12 17:58:15.000000000 +0000
| +++ configure.in 2008-02-12 17:56:53.000000000 +0000
| @@ -974,7 +974,7 @@
| SH_LDFLAGS='-shared -fPIC'
| ;;
| *-*-freebsd*)
| - SH_LD='$(CC)'
| + SH_LD='$(CXX)'
| SH_LDFLAGS="-shared -Wl,-x"
| RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)'
| ;;
| 
| 
| I believe it's against octave-3.0.0_1. Here are snips from the startup 
| message for more specific identification.
| 
| GNU Octave, version 3.0.0
| Octave was configured for "i386-portbld-freebsd6.3".

As I recall, I was told (long ago) that FreeBSD systems required using
the C compiler to build shared libraries.  But if that information is
out of date, I see no problem using the C++ compiler, so I've made
this change.  Since the default for SH_LD is already $(CXX), I think
the line in the *-*-freebsd* case should just be removed.

Are there other patches kept by the person maintaining the FreeBSD
port that have not been passed back to us?  I don't see a lot of
activity on the Octave lists from people who say they are using
FreeBSD (or other BSD-based systems).

jwe


More information about the Bug-octave mailing list