[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ccp4bb]: Compiling CCP4 v4.1



***  For details on how to be removed from this list visit the  ***
***    CCP4 home page http://www.dl.ac.uk/CCP/CCP4/main.html    ***

"C.C.Ballard" wrote:
> 
> Hi Mogens,
> 
> this looks like a problem in the CCIF makefile.  I guess the format for
> nm is not what is expected so a file used in the compilation of the ccif
> library, exports.h, is not correct.  I attach the exports.h from one of
> our Irix boxes.  Confirm that the C routines are as listed (third
> column) on your system, like the second column with an underscore
> appended.  Using nm on compiled C code should tell you.
> 
> Place this in $CCP4/lib/ccif and make in $CCP4.  Hopefully this will work.

It didn't.

The exports.h file I have (when the make stops) contain empty defines:

#define  ccif_add_to_sort       
#define  ccif_block_by_index    
#define  ccif_block_by_name     
#define  ccif_close_cif 

If I replace this with your exports.h file the compilations stops at:

        if test -f so_locations; then cp -f so_locations /tmp; fi; \
                                     ld -64 -shared -all \
                                           -exports_file libccif.exp
libccif.a \
                                           -update_registry
/tmp/so_locations \
                                            -o libccif.so; \
                                     cp -f /tmp/so_locations . ; rm -f
/tmp/so_locations
        cc -c -O -64 -DPROTOTYPE -w   -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1
-DHAVE_STANDARDS_H=1 -DHAVE_ASSERT_H=1 -DUPDATE_WARN=1
-DUSER_ZZMODE_STACK=1 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1
-DHAVE_STANDARDS_H=1 -DHAVE_MMAP=1 -DHAVE_REGEX_H=1   -I. 
cifdic_to_symtab.c
        cc -O -64 -DPROTOTYPE -w   -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1
-DHAVE_STANDARDS_H=1 -DHAVE_ASSERT_H=1 -DUPDATE_WARN=1
-DUSER_ZZMODE_STACK=1 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1
-DHAVE_STANDARDS_H=1 -DHAVE_MMAP=1 -DHAVE_REGEX_H=1   -I.  -o
cifdic_to_symtab cifdic_to_symtab.o  -L`pwd` -lccif -lm  
ld64: ERROR 33: Unresolved text symbol "cifdic_to_symtab_main_" -- 1st
referenced by cifdic_to_symtab.o.
        Use linker option -v to see when and which objects, archives and
dsos are loaded.  
ld64: INFO 152: Output file removed because of error.
*** Error code 2 (bu21)
*** Error code 1 (bu21)

Compiling a simple program like:

#include <stdio.h>

test1()
{
  printf("test1\n");
}

test2()
{
  printf("test2\n");
}

main()
{
  test1();
  test2();
}

Running nm -h on the .o file produces:

...debug_frame    d       0       0
...debug_aranges  d       0       0
...debug_pubnames         d       0       0
...rel.debug_line         d       0       0
...rel.debug_pubnames     d       0       0
...rel.debug_aranges      d       0       0
...rel.debug_info         d       0       0
...rel.debug_frame        d       0       0
...debug_abbrev   d       0       0
...text   T       0       0
...srdata         r       0       0
test1   T       0       60
printf  U       0       0
...debug_line     d       0       0
...debug_info     d       0       0
test2   T       64      60
main    T       128     72

Looks like that trailing underscores aren't necessary,
so I removed them from the exports.h file, but I still get:

        cc -c -O -64 -DPROTOTYPE -w   -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1
-DHAVE_STANDARDS_H=1 -DHAVE_ASSERT_H=1 -DUPDATE_WARN=1
-DUSER_ZZMODE_STACK=1 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1
-DHAVE_STANDARDS_H=1 -DHAVE_MMAP=1 -DHAVE_REGEX_H=1   -I. 
cifdic_to_symtab.c
        cc -O -64 -DPROTOTYPE -w   -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1
-DHAVE_STANDARDS_H=1 -DHAVE_ASSERT_H=1 -DUPDATE_WARN=1
-DUSER_ZZMODE_STACK=1 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1
-DHAVE_STANDARDS_H=1 -DHAVE_MMAP=1 -DHAVE_REGEX_H=1   -I.  -o
cifdic_to_symtab cifdic_to_symtab.o  -L`pwd` -lccif -lm  
ld64: ERROR 33: Unresolved text symbol "cifdic_to_symtab_main" -- 1st
referenced by cifdic_to_symtab.o.
        Use linker option -v to see when and which objects, archives and
dsos are loaded.  
ld64: INFO 152: Output file removed because of error.

Mogens
-- 
Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk