home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / docs / mailinglist-archive / 1993-09 / text0105.txt < prev    next >
Encoding:
Text File  |  1993-06-25  |  1.6 KB  |  47 lines

  1.  
  2. I am having great difficulty compiling Objective-C programs using the
  3. GNU Objective-C Library classes under NetBSD.
  4. (Anonymous ftp at iesd.auc.dk:pub/ObjC/libcoll-930531.tar.z)
  5.  
  6. The libcoll.a library compiles fine (after fixing two bugs in the file
  7. Time.m and making sure the Objective-C includes are in the proper
  8. include paths for cpp), but when I try to compile and link the test
  9. programs, I get an error message similar to:
  10.  
  11. ld: bad magic number in libcoll.a (#1)
  12.  
  13. It will compile, link, and run fine under AmigaDOS. It doesn't work
  14. under NetBSD.
  15.  
  16. After a bit of snooping around, I believe the ld program is screwed up
  17. and needs to be fixed.
  18.  
  19. To verify that ld is the culprit, I copied the libcoll.a and libobjc.a
  20. (which I had to compile manually, as mtw forgot to include it...oops.
  21. :-) ) libraries from the NetBSD filesystem and LINKED them under
  22. AmigaDOS.
  23.  
  24. No errors, the test programs worked perfectly!
  25.  
  26. My guess is that Markus forgot to update ld (and as...) when he ported
  27. gcc 2.4.5.
  28.  
  29.  
  30. gcc, after test1.o is generated, is invoked under AmigaDOS as:
  31.  
  32. >gcc -v -g -I. test1.o -o test1 -L.. -lcoll -lobjc
  33. Reading specs from gcc:compilers/amigados/2.4.5/specs
  34. gcc version 2.4.5
  35.  gcc:compilers/amigados/2.4.5/ld -amiga-debug-hunk -o test1 gcc:lib/crt0.o -L..
  36.  -Lgcc:compilers/amigados/2.4.5 -Lgcc:lib test1.o -lcoll -lobjc -lgcc -lc -lgcc
  37.  
  38. Under NetBSD, the output is similar, yet the bad magic number error shows up.
  39.  
  40. Does anyone have a solution? I REALLY need to get this working for my
  41. UNIX project at school. It can't be done under AmigaDOS. :-(
  42.  
  43. Thanks.
  44. ---------------------------------------------
  45. Max Leung        mleung@eigen.ee.ualberta.ca
  46.  
  47.