Re: [BLAST_ANAWARE] Building a bundled "libBlast.so" instead of shared libraries

From: Chris Crawford (chris2@lns.mit.edu)
Date: Tue Jul 05 2005 - 12:15:54 EDT


hi eugene,
  i apologize for the previous message, i didn't see your questions at
the end. hopefully this response is more useful.
  the configure script was created by autoconf v2.53 (~march 2002) using
the input file is 'autoconf.ac'. most of the architecture-dependent
material comes straight from 'autoconf'; however, the error message you
get from 'configure' comes from a few minor system-dependent tweaks at
the end of 'autoconf.ac' (search "-*linux*" ). you will need to add a
section for Darwin.
  i updated the blast account to the latest version of 'autoconf', v2.59
(dec 2003), which recognizes at least Darwin. to get the official
'$host' string for the mac, run the script "configure.guess". then add
a case for this string at the end after "i*86-*linux*)" in 'configure.ac'.
  most of BlastLib2 is based on the ROOT libraries, which compile on the
mac, so you shouldn't have to change much of the code. i recommend
trying to compile 'make lrn' first with the '--enable-static' flag, and
save dynamic libraries for a second round. we didn't use the 'libtool',
portion of the GNU build system, so you will have to do some fiddling
around in the Darwin section of 'configure.ac' to get it to work.
  after you are done, create the 'configure' script with the command
'autoconf'. you shouldn't have to give any options to 'configure', the
system type is automatically determined by 'config.guess'.
--chris

new autoconf 2.59 (nov 2004) recognizes darwin (see
Chris Crawford wrote:

> eugene,
> are you doing this on a mac? did you compile for the mac? i didn't
> even know that you could compile BlastLib2 on the mac out of the box,
> although it shouldn't too hard to port.
> --chris
>
> Eugene J. Geis wrote:
>
>> In ROOT, I'm trying to load "libBlast.so". This is the output:
>>
>> root [0] .L libBlast.so
>> dlopen error: dlcompat: dyld: /sw/bin/root.exe malformed library:
>> /Users/eugenegeis/analysis/./
>> libBlast.so (not a Mach-O file, bad magic number)
>>
>> Load Error: Failed to load Dynamic link library
>> /Users/eugenegeis/analysis/./libBlast.so
>> *** Interpreter error recovered ***
>>
>> "$ file libBlast.so" returns:
>> libBlast.so: ELF 32-bit LSB shared object, Intel 80386, version 1
>> (SYSV), not stripped
>>
>> I've found some webpages that explain that OSX has problems with a
>> few details, dlopen(), i.e.
>>
>>
>>
>>> To build a shared object on Mac OS X, you need to link with
>>> "-bundle" instead of "-shared". You also usually specify
>>> "-bundle_loader /path/to/executable" to reference the external
>>> symbols that might be used in the shared object. If you don't know
>>> the bundle_loader you can specify "-flat_namespace -undefined suppress"
>>>
>>
>>
>> #1: I can't build "libBlast.so" on OSX because $ ./configure
>> --build=ppc --with-lapack=/sw/lib/
>> returns, "unknown architecture".
>>
>> #2: Can -bundle, -shared be used with ./configure scripts on the
>> Blast machines? I've read elsewhere that custom written Makefiles
>> aren't good with the -bundle handling, so I'm not hopeful that
>> building on linux with our custom makefile will do the trick.
>>
>> #3: Anyone who might have gotten libBlast.so to compile or work with
>> their MAC, can they copy the library to a blast machine and tell me
>> where to get it???
>>
>> eugene
>>
>>



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:32 EST