1 From nobody Sun Dec 14 10:48:09 1997
2 X-From-Line: JoopvandeWege@mococo.nl Wed Dec 03 04:15:19 1997
3 Return-Path: <JoopvandeWege@mococo.nl>
4 Delivered-To: gord@trick.profitpress.com
5 Received: (qmail 1795 invoked from network); 3 Dec 1997 04:15:16 -0000
6 Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1)
7 by localhost with SMTP; 3 Dec 1997 04:15:16 -0000
8 Received: from mcc-server.mococo.nl (mail.mococo.nl [195.193.4.2]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with SMTP id GAA28567 for <gord@m-tech.ab.ca>; Tue, 2 Dec 1997 06:06:47 -0700
9 Received: from laptop.mococo.nl (unverified [195.193.4.9]) by mcc-server.mococo.nl
10 (EMWAC SMTPRS 0.83) with SMTP id <B0000011089@mcc-server.mococo.nl>;
11 Tue, 02 Dec 1997 14:06:15 +0100
12 Date: Tue, 02 Dec 1997 14:06:15 +0100
13 Message-ID: <B0000011089@mcc-server.mococo.nl>
14 From: Joop van de Wege <JoopvandeWege@mococo.nl>
15 To: Gordon Matzigkeit <gord@m-tech.ab.ca>
16 Subject: Re: AmigaOS libtool port
17 In-Reply-To: <86oh339y7g.fsf@trick.profitpress.com>
18 References: <86oh339y7g.fsf@trick.profitpress.com>
20 Content-Type: text/plain; charset=US-ASCII
21 Content-Transfer-Encoding: 7bit
22 X-Mailer: Becky! ver 1.23
23 Xref: trick.profitpress.com mail.libtool:816
25 X-Gnus-Article-Number: 1 Mon Nov 2 17:16:02 1998
29 On 29 Nov 1997 14:39:31 -0700
30 Gordon Matzigkeit <gord@m-tech.ab.ca> wrote:
34 > libtool-1.0g contains some preliminary AmigaOS support. It is a
35 > little different than the patches you sent me, simply because I
36 > modified libtool slightly so that it would better accomodate your
39 > Here are what I consider to be some unresolved issues:
41 > * I have attempted to automatically generate $objdir/a2ixlibrary.data,
42 > just as the OS/2 port does with $objdir/$libname.def. It currently
45 > #define NAME $libname
46 > #define LIBRARY_ID 1
47 > #define VERSION $major
48 > #define REVISION $revision
50 > So, for libhello.la in the libtool distribution, this would make an
51 > a2ixlibrary.data that looks like:
53 > #define NAME libhello
54 > #define LIBRARY_ID 1
58 > Is that alright? My concerns are for the NAME definition, and the
59 > LIBRARY_ID, as I don't know what is valid, or what they are used
61 I have done this also but removed it because there are indeed two
62 problem. The NAME should be 'hello' but this can be solved but the
63 second issue is not so easy. LIBRARY_ID is a uniquely assign number
64 which needs to be different for each .ixlibrary build. The developer of
65 the ixlibrary is maintaining a database of which numbers are assign to
66 which library. Everything below 10 can be used for locally build
67 libraries, thats why I used 1.
68 So it is specific to the Amiga but it looks like overkill to me to
69 include the whole list into Libtool (about 50 entries right now).
72 > * What does `assign libs: SOMEDIR [add|remove]' do, exactly? Is it
73 > something like `ldconfig'? If so, then we should do something cleaner
74 > than in your current patch: it doesn't belong in archive_cmds or
75 > finish_cmds, it belongs in the generated executable wrapper.
76 Yes, it does something like ldconfig. I followed that thread about it
77 and its very similar but also has some differences.
78 LIBS: is a logical directory where all libraries are, but that doesn't
79 mean that they reside physically in the same directory on disk.
80 It is a way of telling the OS where to look when a program requests a
81 library, something along these lines:
84 GfxBase=OpenLibrary("graphics.library",37L);
85 HelloBase=OpenLibrary("libhello.ixlibrary",3L);
88 Graphics.library is in ROM and will just have its open count incremented
89 but nothing else will happen. libhello.ixlibrary is loaded from disk if
90 it isn't already in memory, but one needs to tell the system where to
91 load it from. It will look in SYS:libs (another logical device (normally
92 the boot partition ~= /usr ) containing a libs directory) but it is
93 possible to add directories to this logical assignment with 'assign',
95 assign SOMEDIR LIBS: add
96 or remove them like this:
97 assign SOMEDIR LIBS: remove
98 SOMEDIR is composed of DRIVE+DIRECTORY (absolute) or DIRECTORY
99 (relative) from where the assign is executed.
100 The reason I used the assignment was because 'make check' didn't work
101 correctly because libhello.ixlibrary is generated in .libs which is not
102 where 'hell' is started from. The system looks in the current directory
103 for .libraries but I'm not sure about .ixlibraries. The alternative was
104 to install them first before 'make check'. Bad idea.
105 The assignment is not placed into a config file or so. The next reboot
106 will destroy it, no ld.so.conf.
108 Probably you're now more confused then ever :)
111 > * I suspect you don't know what I mean by `hardcoding' a library
112 > directory, so I've interpreted your patch, and come up with hardcode_*
113 > settings that I believe will work. We need to test that, during the
115 I have already merged most things into lt-1.0h but I'm short on freetime
116 this week. I hope to have a couple of hours but it could be that I can
117 do only some work during the weekend.
120 > * Could you please tell me more about the AmigaOS requirements? Some
121 > of your patch is impossible for me to decipher, because I have no idea
122 > what you want to accomplish, and I don't think you're taking full
123 > advantage of libtool's internal conventions.
125 > In plain language, what are the answers to the following questions:
127 > * What exactly are `$libname_ixlibrary.a', `$libname.ixlibrary', and
128 > `$libname.a'? Is `$libname.a' the same file and installed in the same
129 > place when building static libraries?
130 Just in case I don't manage to make this clear. Have a look at the
131 readme of the following archive (and maybe the rest of it aswell:
132 ftp://ftp.ninemoons.com/pub/geekgadgets/971125/amiga-src/a2ixlibrary-2.0-src.tgz
135 Dynamic libraries on the Amiga (in short)
136 first compile all object with the following additional CFLAGS:
137 -resident32 -malways-restore-a4 (these are the safest, -resident and
138 -m...restore.. can also be use but then certain limitations and
139 restrictions are imposed)
140 AR and RANLIB these into libNAME.a (-->$libname.a)
141 run a2ixlibrary on libNAME.a --> $libname_ixlibrary.a and $libname.ixlibrary
142 where _ixlibrary.a contains stubs and .ixlibrary contains the real code.
143 (NAME.h and NAME.x are also generated and automatically installed by
144 a2ixlibrary and are used by collect2)
145 libNAME.a can be discarded after running a2ixlibrary.
146 libNAME_ixlibrary.a gets installed in /usr/lib together with all the
147 other linker libraries.
148 libNAME.ixlibrary should be installed somewhere in a directory belonging
149 to LIBS: There is a subdirectory in /gg where the gnu-tools are
150 installed called sys/libs which should be used for this, prevents
151 cluttering the main libs directories.
153 Static libraries on the Amiga:
154 compile all objects with the CFLAGS of your choice
155 AR and RANLIB these into libNAME.a
160 > * How are each of them generated?
162 > * Where do they need to be installed?
163 Answered above, I hope.
165 > * `shlibpath_var' is the name of the runtime library search path
166 > environment variable. On Linux, it is `LD_LIBRARY_PATH'. So, if you
167 > install libhello.so in /home/gord/lib, binaries won't be able to
168 > execute unless you set `LD_LIBRARY_PATH=/home/gord/lib' before running
169 > them. Is there an equivalent variable under AmigaOS?
170 Assign LIBS: home:gord/lib add
171 Nope, ':' is NOT a typo. The root directory is ':' on the amiga and
172 cd / means move up one level, cd : means move to root.
173 There is a unix emulation library, ixemul.library, which handles things
174 like cd .. and cd / when one is using programs linked against it.
175 Thats why almost, if not all gnu tools are available for the Amiga and
176 they also work like on Unix. These leads to difficulties when mixing
177 'native' Amiga programs and ixemul.library linked ones. The path
178 differences are most prominent.
180 Somewhere in my patches I use a native program 'assign' inside ksh.
181 Further I have the gnu-tools installed under the 'gg' directory and
182 reference them in ksh using /gg.
183 Libtool libraries end up in /gg/lib (libNAME_ixlibrary.a, libNAME.a) and
184 the dynamic library ends up in /gg/sys/libs (libNAME.ixlibrary)
185 The system finds these because of the following statement:
186 assign LIBS: gg:sys/libs add
187 But some people like to specify --prefix=/local when configuring
188 packages and they also want the dynamic library to appear under
189 /local/sys/libs and thats why I have the sed substitution in postinstall_cmds
190 (?). Those people are responsible that they have an assignment that
191 tells the system to look into the proper directory for .ixlibraries.
194 No thanks, hope this clears up a lot of things. If not, ask me and I'll
195 try to clarify things.
200 Joop van de Wege (JoopvandeWege@mail.mococo.nl)
201 Mobile Computing Consultants
204 From nobody Sun Dec 14 10:48:13 1997
205 X-From-Line: JoopvandeWege@mococo.nl Sat Dec 13 03:05:34 1997
206 Return-Path: <JoopvandeWege@mococo.nl>
207 Delivered-To: gord@trick.profitpress.com
208 Received: (qmail 11049 invoked from network); 13 Dec 1997 03:05:32 -0000
209 Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1)
210 by localhost with SMTP; 13 Dec 1997 03:05:32 -0000
211 Received: from mcc-server.mococo.nl (mail.mococo.nl [195.193.4.2]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with SMTP id GAA11738 for <gord@m-tech.ab.ca>; Fri, 12 Dec 1997 06:47:52 -0700
212 Received: from laptop.mococo.nl (unverified [195.193.4.9]) by mcc-server.mococo.nl
213 (EMWAC SMTPRS 0.83) with SMTP id <B0000011567@mcc-server.mococo.nl>;
214 Fri, 12 Dec 1997 14:48:06 +0100
215 Date: Fri, 12 Dec 1997 14:48:06 +0100
216 Message-ID: <B0000011567@mcc-server.mococo.nl>
217 From: Joop van de Wege <JoopvandeWege@mococo.nl>
218 To: Gordon Matzigkeit <gord@m-tech.ab.ca>
220 Subject: Re: AmigaOS libtool port
221 In-Reply-To: <86zpm8qm6o.fsf@trick.profitpress.com>
222 References: <B0000011089@mcc-server.mococo.nl> <86zpm8qm6o.fsf@trick.profitpress.com>
224 Content-Type: text/plain; charset=US-ASCII
225 Content-Transfer-Encoding: 7bit
226 X-Mailer: Becky! ver 1.23
227 Xref: trick.profitpress.com mail.libtool:868
229 X-Gnus-Article-Number: 2 Mon Nov 2 17:16:02 1998
233 On 11 Dec 1997 02:11:11 -0700
234 Gordon Matzigkeit <gord@m-tech.ab.ca> wrote:
238 > >>>>> Joop van de Wege writes:
240 > >> Is that alright? My concerns are for the NAME definition, and the
241 > >> LIBRARY_ID, as I don't know what is valid, or what they are used
244 > JvdW> I have done this also but removed it because there are indeed
245 > JvdW> two problem. The NAME should be 'hello' but this can be solved
246 > JvdW> but the second issue is not so easy. LIBRARY_ID is a uniquely
247 > JvdW> assign number which needs to be different for each .ixlibrary
248 > JvdW> build. The developer of the ixlibrary is maintaining a database
249 > JvdW> of which numbers are assign to which library. Everything below
250 > JvdW> 10 can be used for locally build libraries, thats why I used 1.
251 > JvdW> So it is specific to the Amiga but it looks like overkill to me
252 > JvdW> to include the whole list into Libtool (about 50 entries right
255 > I suggest that the ixlibrary maintainer come up with a hash function
256 > that will map library names to numbers, so that if the LIBRARY_ID is
257 > not specified, it will be automatically generated by this hash
260 > If two hashed library codes conflict, then libtool will still have to
261 > provide a way for maintainers to specify the correct LIBRARY_ID.
263 > However, the current design of ixlibrary is not good because it means
264 > installing two libtool libraries will *always* cause a conflict,
265 > unless both package maintainers cared enough to be assigned a
267 The current situation is that all packages on ftp.ninemoons.com are
268 under CVS (amiga specific code added) and that for each snapshot Amiga
269 specific patches are applied to the baseline sources, whether they
270 originate from FSF or someplace else doesn't matter.
271 This means that for each library which can be turned into a *.ixlibrary
272 an a2ixlibrary.data{.in} exists.
274 It would be nice if the LIBRARY_ID's could be maintained in one location
275 and that location being libtool. On the other hand lots of people might
276 have objections against such a special treatment to the Amiga.
277 It might mean a lot of code just to support on platform.
280 > When I accepted the patches for the AmigaOS shared libraries, I was
281 > not aware of this limitation. You are basically telling me that there
282 > is no way for me to automatically generate correct shared libraries on
284 No, unless I start digging into the a2ixlibrary source to see if I can
285 find a way to automate things. The problem is in the fact that the ID is
286 hardcoded into the library (like paths on some other platforms) and the
287 ID must be unique, making distribution of binaries almost impossible.
290 > Unless this issue can be resolved, I think I should remove the AmigaOS
291 > support, because it will cause more problems than it solves. Shared
292 > libraries, IMO, are not worth the time and effort of every maintainer
293 > having to register with the AmigaOS ixlibrary project.
294 Libtool can still be a package useful for the Amiga but it will get the
295 same treatment as all others, keep a baseline and apply patches when
299 > JvdW> Somewhere in my patches I use a native program 'assign' inside
300 > JvdW> ksh. Further I have the gnu-tools installed under the 'gg'
301 > JvdW> directory and reference them in ksh using /gg. Libtool
302 > JvdW> libraries end up in /gg/lib (libNAME_ixlibrary.a, libNAME.a)
303 > JvdW> and the dynamic library ends up in /gg/sys/libs
304 > JvdW> (libNAME.ixlibrary)
307 > JvdW> people like to specify --prefix=/local when configuring
308 > JvdW> packages and they also want the dynamic library to appear under
309 > JvdW> /local/sys/libs and thats why I have the sed substitution in
310 > JvdW> postinstall_cmds (?). Those people are responsible that they
311 > JvdW> have an assignment that tells the system to look into the
312 > JvdW> proper directory for .ixlibraries.
314 > This is a problem. Why do dynamic libraries have to go into a
315 > separate directory?
316 This way it doesn't clutter a directory where no executables belong in.
317 It is also historical and because the Amiga isn't a real Unix machine.
318 It uses ixemul.library for its unix emulation, something like cygwin32.dll
320 > sys/libs sounds like a violation of the GNU directory conventions,
321 > which is a problem. It means that even GNU packages will not install
322 > binaries according to their own conventions. :(
324 > It seems to me to be much better if we just put everything into
325 > libdir. Can this work?
328 I'll forward this reply to some relevant Amiga mailinglists to see if
329 people are willing to change things.
334 Please comment on this, Fred, Hans?
338 Joop van de Wege (JoopvandeWege@mail.mococo.nl)
339 Mobile Computing Consultants