Skip to content

RMySQL not loading on Mac OS X

3 messages · Georg Otto, Bill Northcott

#
On 11/08/2005, at 8:00 PM, Georg Otto wrote:
I notice this question never got a reply.

It would have been better asked on the sig-Mac list, but here are  
some pointers.

The
is caused by not linking all the necessary system libraries.

Either
1.  there is an attempt to link objects and/or static libraries built  
with gcc-3.x/g77 with objects produced by gcc-4.x/gfortran.  This  
will not work.
or
2.  there is an attempt to link using ld or libtool rather than the  
gcc compiler driver which will ensure that appropriate system  
libraries are used.

FWIW I had no problem building it, but I was using an R package which  
I built from source.  So I know the same compiler was used throughout.

If you are using the R binary distribution, make sure you have run  
'sudo gcc_select 3.3' to get the right default compiler.

Bill Northcott
#
Bill,

thanks a lot for your answer. I did not know about the sig-Mac list.  
I will post there next time if I do not find a solution.

Concerning your suggestion: The system default compiler is gcc 4.0,  
but RMySQL seems to be built using gcc-3.3 regardless if I switch to  
3.3. or not.

Would it be a solution to force RMySQL to use gcc 4.0 during built?  
(Might be a naive idea, I am quite new to this). And if yes, how  
could I do this?

Best,

Georg
On 18 Aug 2005, at 04:21, Bill Northcott wrote:

            
#
On 18/08/2005, at 7:46 PM, Georg Otto wrote:
When R is built it stores the configuration including the compilers  
which were used.  When you try to build a source package, it uses the  
same compile commands.   However, this is a less than perfect  
mechanism and requires that the packagers of binaries understand what  
is going on.

For instance on Panther 'gcc' by default means gcc-3.3, whereas on  
Tiger by default it means gcc-4.0.  So a package built with 'gcc' and  
'g77' will work on Panther but not Tiger.  See the problem.

OTOH 'gcc-3.3' means gcc-3.3 on either Panther or Tiger, but  
'gcc-4.0' won't work on Panther at all.

The best solution is to build everything from source with the same  
compilers.  That way you cannot have a compatibility problems.

Hopefully soon the transition to gcc-4 will be complete.  The change  
to Intel guarantees that, because the Apple gcc-3.3 compilers don't  
do x86 code.  In a perfect future Apple will include Fortran in their  
Developer tools distribution, but for now they want gcc-4 and  
gfortran is not quite ready for the big time.

Bill Northcott