[Bioclusters] mpiBlast OS X
Joe Landman
bioclusters@bioinformatics.org
Fri, 01 Oct 2004 10:24:30 -0400
(popping head up for a moment)
If you have the readelf/objdump tools around, and you know which object
file or library is complaining about a missing link, you can walk the
cat backwards (start at the object file or library with the missing
link, look at the symbols, and try to see in /usr/lib or similar, which
library has these symbols ... a simple foreach loop with a
readelf/objdump and a grep is quite helpful here).
I have used this methodology with a compiler vendors compilers recently
to fix some chemistry code support. It is annoying and time consuming,
but not impossible.
Joe
Aaron Darling wrote:
> I haven't tried it (I don't have an OS X machine handy at the moment),
> but based on a perusal of NCBI's darwin.ncbi.mk file, it looks like
> they add "-framework CoreServices" and "-lc" to the link command. You
> may also need "-framework Carbon", but I'm guessing not since that
> looks like it's just for gui apps on OS X.
> Good luck, hope it works this time around!
> -Aaron
>
> Nick Brockner wrote:
>
>> I now have it almost linking, except for this:
>>
>> ld: Undefined symbols:
>> _DisposeHandle
>> _HLock
>> _HUnlock
>> _MemError
>> _NewHandle
>> _SetHandleSize
>> _FSPathMakeRef
>> mpiCC: No such file or directory
>>
>> Using this command to link:
>>
>> mpiCC -O2 -DINSTALL_PREFIX="\"/usr/local\"" -g -O2 -o mpiblast
>> mpiblast-blastjob.o mpiblast-db_spec.o mpiblast-blast_hooks.o
>> mpiblast-embed_rank.o mpiblast-file_util.o mpiblast-fragment_list.o
>> mpiblast-mpiblast_util.o mpiblast-mpiblast.o
>> mpiblast-mpiblast_config.o mpiblast-ncbi_sizeof.o
>> mpiblast-distributed_bioseq.o /usr/local/ncbi/build/ncbithr.o
>> -lncbitool -lncbiobj -lncbi -L/usr/local/ncbi/lib/ -lm -lpthread
>> -lstdc++
>>
>> I searched all over and cannot find what to link with for these. I
>> appreciate all the help you have given so far with this.
>>
>> Thanks,
>>
>> -Nick
>> On Sep 30, 2004, at 5:49 PM, Aaron Darling wrote:
>>
>>> Yes, looks like something wrong with the build environment. Looks
>>> like it's not linking to the c++ library. Usually the GNU standard
>>> c++ library can be linked with -lstdc++. You could either add that
>>> to the CXXFLAGS environment variable and reconfigure or just copy
>>> the link command, add -lstdc++, and run it from within the src dir.
>>> In the past we've only tested releases on Linux and Windows, sounds
>>> like that needs to change :)
>>>
>>> -Aaron
>>>
>>> Nick Brockner wrote:
>>>
>>>> Ok, now that getopt() is out of the way it compiles, but then when
>>>> it goes to link I get this garbage:
>>>>
>>>> ld: Undefined symbols:
>>>> std::basic_ostream<char, std::char_traits<char>
>>>> >::operator<<(std::basic_ostream<char, std::char_traits<char> >&
>>>> (*)(std::basic_ostream<char, std::char_traits<char> >&))
>>>> std::basic_ostream<char, std::char_traits<char> >::operator<<(double)
>>>> std::basic_ostream<char, std::char_traits<char> >::operator<<(long)
>>>> std::basic_ostream<char, std::char_traits<char>
>>>> >::operator<<(unsigned long)
>>>> std::basic_string<char, std::char_traits<char>,
>>>> std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)
>>>> .
>>>> .
>>>> .
>>>>
>>>> I think this has nothing to do with the mpiBlast code, and has
>>>> something to do with Apple's build environment. Difficult build,
>>>> this is.
>>>>
>>>> Thanks,
>>>>
>>>> -Nick Brockner
>>>> On Sep 30, 2004, at 3:35 PM, Aaron Darling wrote:
>>>>
>>>>> This happens on OS X, Solaris, and AIX because our getopt()
>>>>> detection was broken in 1.2.1. A quick fix is to comment out line
>>>>> 147 of mpiBLAST-1.2.1/src/getopt.h
>>>>> e.g. change:
>>>>> extern int getopt ();
>>>>> to:
>>>>> /* extern int getopt (); */
>>>>>
>>>>> -Aaron
>>>>>
>>>>> Nick Brockner wrote:
>>>>>
>>>>>> Hi Aaron,
>>>>>>
>>>>>> Thanks for the pointer. Using the Oct. 2003 ncbi toolkit worked
>>>>>> for the previous error, but now I have a more sinister looking
>>>>>> error:
>>>>>>
>>>>>> In file included from /usr/include/pthread.h:61,
>>>>>> from
>>>>>> /usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr-default.h:37,
>>>>>> from
>>>>>> /usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/gthr.h:98,
>>>>>> from
>>>>>> /usr/include/gcc/darwin/3.3/c++/ppc-darwin/bits/c++io.h:37,
>>>>>> from
>>>>>> /usr/include/gcc/darwin/3.3/c++/bits/fpos.h:44,
>>>>>> from /usr/include/gcc/darwin/3.3/c++/iosfwd:49,
>>>>>> from
>>>>>> /usr/include/gcc/darwin/3.3/c++/bits/stl_algobase.h:70,
>>>>>> from /usr/include/gcc/darwin/3.3/c++/algorithm:66,
>>>>>> from mpiblast.cpp:86:
>>>>>> /usr/include/unistd.h:183: error: declaration of C function `int
>>>>>> getopt(int,
>>>>>> char* const*, const char*)' conflicts with
>>>>>> getopt.h:147: error: previous declaration `int getopt()' here
>>>>>> In file included from file_util.hpp:58,
>>>>>> from mpiblast.hpp:71,
>>>>>> from mpiblast.cpp:88:
>>>>>>
>>>>>>
>>>>>> Has anyone seen this before? Looks OS X specific.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> -Nick Brockner
>>>>>>
>>>>>> On Sep 30, 2004, at 2:51 PM, Aaron Darling wrote:
>>>>>>
>>>>>>> Assuming you are using mpiBLAST 1.2.1, you need to use the
>>>>>>> October 2003 release of the NCBI Toolbox from here:
>>>>>>> ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools/old/
>>>>>>>
>>>>>>> Each version of mpiBLAST is designed to compile against a
>>>>>>> specific version of the NCBI Toolbox, as mentioned on our
>>>>>>> download page here:
>>>>>>>
>>>>>>> http://mpiblast.lanl.gov/download.html
>>>>>>>
>>>>>>> Later toolbox releases changed the API to BlastMakeMultQueries
>>>>>>> and BXMLPrintOutput, which is why you are seeing those build
>>>>>>> errors.
>>>>>>>
>>>>>>> Regards,
>>>>>>> -Aaron
>>>>>>>
>>>>>>> Nick Brockner wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> I think I am missing something here, but attempting to compile
>>>>>>>> mpiBlast gets me the following:
>>>>>>>>
>>>>>>>> blast_hooks.c: In function `getFakeBioseq':
>>>>>>>> blast_hooks.c:785: error: too few arguments to function
>>>>>>>> `BlastMakeMultQueries'
>>>>>>>> blast_hooks.c: In function `outputResults':
>>>>>>>> blast_hooks.c:1334: error: too few arguments to function
>>>>>>>> `BXMLPrintOutput'
>>>>>>>> blast_hooks.c:1345: error: too few arguments to function
>>>>>>>> `BXMLPrintOutput'
>>>>>>>> blast_hooks.c:1493: error: too few arguments to function
>>>>>>>> `BXMLPrintOutput'
>>>>>>>> blast_hooks.c:1498: error: too few arguments to function
>>>>>>>> `BXMLPrintOutput'
>>>>>>>> mpicc: No such file or directory
>>>>>>>> make[1]: *** [mpiblast-blast_hooks.o] Error 1
>>>>>>>> make: *** [all-recursive] Error 1
>>>>>>>>
>>>>>>>>
>>>>>>>> My setup:
>>>>>>>> OS X Server 10.3.5
>>>>>>>> gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
>>>>>>>> NCBI toolkit installed
>>>>>>>> LAM-MPI version 7.0.6
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> -Nick Brockner
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>>>>>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>>>>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>>>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>
>>>
>>>
>>> _______________________________________________
>>> Bioclusters maillist - Bioclusters@bioinformatics.org
>>> https://bioinformatics.org/mailman/listinfo/bioclusters
>>>
>>
>> _______________________________________________
>> Bioclusters maillist - Bioclusters@bioinformatics.org
>> https://bioinformatics.org/mailman/listinfo/bioclusters
>
>
> _______________________________________________
> Bioclusters maillist - Bioclusters@bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/bioclusters
--
Joseph Landman, Ph.D
Scalable Informatics LLC,
email: landman@scalableinformatics.com
web : http://scalableinformatics.com
phone: +1 734 612 4615