[R-SIG-Mac] Trouble building Rgraphviz: Tiger, cc_dynamic
simon.urbanek at r-project.org
Wed Jul 6 17:20:50 CEST 2005
On Jul 6, 2005, at 10:12 AM, Seth Falcon wrote:
> I'm running a built from source R 2.2 (devel) on Tiger. When I try
> to install Rgraphviz, I get this when it tries to link the
Where and how did you configure R? It seems as if you configured R in
Panther or mixed gcc3 and gcc4 - neither is a good idea.
In Panther there is only gcc3 so cc_dynamic is always needed.
However, if you upgrade such system to Tiger, cc_dynamic is removed
by default so won't be able to compile packages anymore. You'll need
to patch configured R files or re-configure/compile R for Tiger.
In Tiger there is gcc3 and gcc4:
- If you use g77 then you must use gcc3 and cc_dynamic is needed
(what Bill was mentioning is that using CC=gcc-3.3 is not sufficient,
you must also run gcc_select 3.3).
- If you use gcc4 and gfortran then cc_dynamic is not needed.
Since you seem to use both /sw and /usr/local there may be even some
conflict of the compilers you use - you should check the compiler
within R to make sure you have compatible versions.
For the CRAN binary we exploit the fact that cc_dynamic is static, so
once linked into libR it's not needed anymore. Install script swaps
Makevars and SHLIB for Tiger to remove -lcc_dynamic from the flags
even though gcc3 is used. This allows us to compile packages with
gcc3 even if gcc4 is selected.
> gcc -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/
> local/lib -o Rgraphviz.so Rgraphviz.o RgraphvizInit.o -L/usr/local/
> lib/graphviz -ldotneato -lm -lcc_dynamic -L/Users/Shared/builds/
> rpat/lib -lR
> /usr/bin/ld: can't locate file for: -lcc_dynamic
> collect2: ld returned 1 exit status
> make: *** [Rgraphviz.so] Error 1
More information about the R-SIG-Mac