IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 19 years ago

Closed 19 years ago

#991 closed defect (needinfo)

Ohana fails to compile (link) with Undefined symbols: _stripwhite _stripwhite

Reported by: jester@… Owned by: eugene
Priority: high Milestone:
Component: Ohana Version: 2.3
Severity: critical Keywords:
Cc:

Description

This bug is a compile failure that's been with us on the Mac since 2.0 - see http://pan-starrs.ifa.hawaii.edu/mailman/private/ps-ipp-users/msg00007.html

It occurs when compiling the dynamic libFITS.dylib

The missing symbols are in libFITS.a which gets compiled just before.

I believe Nicolas managed to work around it by compiling Ohana until the link failure occurs, then editing the Makefile to add libfits.a to the list of libraries by hand. See http://pan-starrs.ifa.hawaii.edu/mailman/private/ps-ipp-users/msg00009.html This workaround still works in 2.3.

Here's the build output leading up to the failure:

rm -f /Volumes/Data/ipp/ipp-2.3.darwin_x86/lib/libFITS.a
cp /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/lib/libFITS.darwin_x86.a /Volumes/Data/ipp/ipp-2.3.darwin_x86/lib/libFITS.a
installed static library libFITS

rm -f /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/lib/libFITS.darwin_x86.dylib
gcc -dynamiclib -o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/lib/libFITS.darwin_x86.dylib /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_modify.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_create_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_free_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_H_field.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_read_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_write_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_scan.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_print.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_copy_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_delete.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_read_XH.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/F_init_H.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/header/version.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_add_M_value.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_add_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_create_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_divide_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_free_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_copy_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_write_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_get_M_value.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_multiply_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_read_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_insert_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_set_M_value.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_convert_format.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_read_segment.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_read_portion.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_load_M.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/matrix/F_matrix.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_create_T.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_create_TH.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_read_T.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_read_TH.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_write_T.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_write_TH.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_define_column.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_table_format.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_set_column.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_get_column.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_table_row.darwin_x86.o /Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/table/F_free_T.darwin_x86.o -lc
ld: Undefined symbols:
_stripwhite
_dparse
/usr/bin/libtool: internal link edit command failed
make[3]: * Volumes/Data/jester/IPP/ipp-2.3/Ohana/src/libfits/lib/libFITS.darwin_x86.dylib Error 1
make[2]:
* [libfits.install] Error 2
make[1]: * [libs] Error 2
make:
* [all] Error 2
problem building Ohana : failure in make

Change History (1)

comment:1 by eugene, 19 years ago

Resolution: needinfo
Status: newclosed

I believe this error is caused because the Mac ld attempts to resolve the symbols on link, and it cannot find the ohana symbols. (One reason to doubt this explanation: the function strcreate is defined by ohana, but is not listed as missing in the errors below). There are two solutions: 1) tell the linker when making dylibs not to require the symbols and 2) pass the -lohana flag on to gcc when building the dylib. I've chosen the latter for now, and have added the equivalent flags for libFITS, libdvo, etc when building the higher level libraries (the dependency chain is: libohana -> libFITS -> libdvo -> libkapa)

If this fix does not work, we can try (1), which has the drawback of being a bit slower at run time (and also I am not certain of the syntax; it might be -flat-namespace).

Note: See TracTickets for help on using tickets.