[Bioc-devel] RBGL 1.12 compile/install issue
Ben Snyder
bs2282 at columbia.edu
Tue Jun 19 15:02:47 CEST 2007
Hello Li, hello list
I don't know what to copy from SHLIB, though here's my guess.
Variables:
objs=
shlib=
makefiles="-f ${R_SHARE_DIR}/make/shlib.mk"
shlib_libadd=''
with_cxx=false
with_f77=false
with_f9x=false
with_objc=false
with_objcxx=false
pkg_libs=
This looks important:
makeargs="SHLIB=\"${shlib}\""
if ${with_f9x}; then
makeargs="SHLIB_LDFLAGS='\$(SHLIB_FCLDFLAGS)' ${makeargs}"
makeargs="SHLIB_LD='\$(SHLIB_FCLD)' ${makeargs}"
else
if ${with_cxx}; then
makeargs="SHLIB_LDFLAGS='\$(SHLIB_CXXLDFLAGS)' ${makeargs}"
makeargs="SHLIB_LD='\$(SHLIB_CXXLD)' ${makeargs}"
fi
if ${with_f77}; then
if ${with_objc}; then
shlib_libadd="\$(OBJC_LIBS) ${shlib_libadd}"
fi
if test -z "${shlib_libadd}"; then
makeargs="${makeargs} SHLIB_LIBADD='\$(FLIBS)'"
else
makeargs="${makeargs} SHLIB_LIBADD='\$(FLIBS) ${shlib_libadd}'"
fi
else
if ${with_objc}; then
makeargs="${makeargs} SHLIB_LIBADD='\$(OBJC_LIBS)'"
fi
fi
fi
if test -n "${pkg_libs}"; then
makeargs="${makeargs} PKG_LIBS='${pkg_libs}'"
fi
And the final line:
eval ${MAKE} ${makefiles} ${makeargs} ${makeobjs}
Let me know if I'm missing something here.
What also looks pertinent is my shlib.mk:
## ${R_HOME}/share/make/shlib.mk
include $(R_HOME)/etc${R_ARCH}/Makeconf
$(SHLIB): $(OBJECTS)
$(SHLIB_LINK) -o $@ $(OBJECTS) $(ALL_LIBS)
and my etc/Makeconf:
SHLIB_CFLAGS =
SHLIB_CXXFLAGS =
SHLIB_CXXLD = g++
SHLIB_CXXLDFLAGS =
SHLIB_EXT = .so
SHLIB_FCLD = g77
SHLIB_FCLDFLAGS = -shared
SHLIB_FFLAGS =
SHLIB_LD = gcc -std=gnu99
SHLIB_LDFLAGS = -shared
SHLIB_LIBADD =
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LDFLAGS)
Right off the top, it looks to me that my with_cxx, with_f77 and
with_f9x variables are set incorrectly. Does anything else seem amiss?
Thanks,
Ben
Li.Long at isb-sib.ch wrote:
> Hi, Ben,
>
> Could you take a look at your .../R-2.5.0/bin/SHLIB? This is what
> packages use to build their shared libs. This script is auto-generated
> based on
> R-2.5.0/src/scripts/SHLIB.in
> when you install R. There's nothing special in generating .so in RBGL
> compared with generating .so in other packages.
>
> I don't have access to CentOS, but I suspect that during your R
> installation, the "configure"-step didn't set the "-shared" flag properly.
> In that case, the fix will have to go to R installation to handle CentOS
> correctly.
>
> Let me know. Thanks.
>
> Li
>
>
>> Hello folks
>>
>> No question here, just information. I've noticed a small problem when
>> trying to install RBGL 1.12 on a Linux platform. The compilation steps
>> work fine, until the .so object is to be built. There is no -shared
>> flag, so it tries to build a standalone executable instead of a shared
>> object.
>>
>> My system details are:
>> CentOS 4.5
>> gcc/g++ version 3.4.6 (Also tried with 4.1)
>> R version 2.5.0
>>
>> This issue was fixed easily enough by adding the line 'PKG_LIBS=-shared'
>> to the src/Makevars file, then re-tarring the package
>>
>> Sincerely,
>> Ben Snyder
>>
>>
>>
>
>
>
More information about the Bioc-devel
mailing list