Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!mtiame!jep From: jep@mtiame.mtia.oz (Jesper Peterson) Newsgroups: comp.sys.amiga.tech Subject: Compiling shared libraries with Aztec 5.0*d* Message-ID: <1990Dec14.030337.11636@mtiame.mtia.oz> Date: 14 Dec 90 03:03:37 GMT Organization: Metal Trades Industry Association, Victoria, Australia. Lines: 49 Has anyone tried to compile a shared library with Aztec 5.0d? Something seems to have been broken between 5.0a and the later releases. I'd like to hear other users experiences before putting in a bug report to Manx. Here is what happens: I am trying to recompile an unmodifed rexxhost.library from Fish Disk 355. The only changes are: Comment out use of AG_CloseLib. I don't have this in my alerts.h what should it be? Cast the second argument in the Alert() calls to long. Compiling this with cc from 5.0a and ln and as from 5.0d and linking with the 5.0d libraries creates a perfect rexxhost.library tested with "fancydemo". Compiling with the 5.0d suite exclusively and running fancydemo crashes with guru 4. finding the specific cause of the suspected compiler bug is no picnic but it seems the library base pointer is NULL within the library routines. eg: LibOpen() { struct RexxHostBase *RexxHostBase; etc.... Trying to initialise any fields in the library base structure here will dereference a garbage or NULL pointer. Turning optimisation off causes a hung process instead of crash but other processes are unaffected. I tried using combinations of compiler flags including the new -r6 flag which causes A6 to be saved/restored around "amicalls" All of the above seems to be true for the sample res_lib on one of the Aztec distribution disks as well (haven't spent much time on this one). Can anyone confirm that this happens to them also? Possibly try recompiling your favourite library? Smart-ass remarks from Lattice users will be ignored. Thanks for your time. Jesper Peterson. -- ------------------------------------------------------------------------------ USEnet: jep@mtiame.mtia.oz.au UUCP: ...!uunet!munnari!mtiame.oz!jep [...] I had to leave out reality to keep the post clean and to the point. - jeremy@milton.u.washington.edu (Jeremy York) in rec.music.misc