Le samedi 24 octobre 2009 22:03:02, Kern Sibbald a écrit :
> On Wednesday 21 October 2009 01:19:47 James Harper wrote:
> > The attached patch works for me. I replaced your makedef file with mine,
> > tidied it up a bit (eg used your nm path code), and put it in the
> > Makefile so that a 'make' takes care of everything. Not tested for 64
> > bit though... is the 64 bit mingw still called mingw32? If so it might
> > 'just work'. It should also be a bit less sensitive to future changes to
> > nm.
> 
> I believe that the mingw32 nm works on 64 bits, but I am not sure -- maybe
> Eric can answer this.

No reason to get the 32 bit version working with the 64 objects :-) They don't 
have the same format.

> I am sure that the win64 version of the def files is
> sometimes different, and I just patch it appropriately.  However, usually
>  the entry points are the same.
> 
> I've asked Eric to look at your patch to see if it works reliably enough to
> call it every time when building.

It just needs to have to choose between the 64 and the 32 bit version of nm 
before generating the .def file.

> Thanks for working on this -- it will vastly simplify our lives :-)

For sure!

It's commited.

Bye

> Regards,
> 
> Kern
> 
> > James
> >
> > > -----Original Message-----
> > > From: Kern Sibbald [mailto:[email protected]]
> > > Sent: Wednesday, 21 October 2009 00:11
> > > To: James Harper
> > > Cc: [email protected]
> > > Subject: Re: [Bacula-devel] fix another link error in Windows
> > >
> > > Hello James,
> > >
> > > There is a script called make_def in each of directories with xxx.def
> > > files. In principle, it should make the def file, but due to changes
> >
> > in
> >
> > > nm, it no longer works perfectly, so I redirect it to a file then cut
> >
> > and
> >
> > > paste.
> > >
> > > The original files bacula.def were made using that script, so in
> > > principle, if someone were to work on it a bit, one could once again
> > > create the .def file completely each time.  What does work in the
> >
> > script
> >
> > > is that it knows where nm can be found.
> > >
> > > Best regards,
> > >
> > > Kern
> > >
> > > >> Time to look at trying to automate that file I think...
> > > >
> > > > I wrote the following little bit of shell code and put it in
> > > > src/win32/lib/mk_def.sh:
> > > >
> > > > "
> > > > #bin/sh
> > > >
> > > > echo LIBRARY bacula.dll
> > > > echo EXPORTS
> > > >
> > > > /usr/local/src/bacula.git/cross-tools/mingw32/mingw32/bin/nm \
> > > >  --defined-only --extern-only $@ | while read addr type sym
> > > > do
> > > >  sym=`echo $sym | cut -c2-`
> > > >  case "$type" in
> > > >   "B")
> > > >    echo $sym DATA
> > > >    ;;
> > > >   "T")
> > > >    echo $sym
> > > >    ;;
> > > >   "")
> > > >    echo "; $addr"
> > > >    ;;
> > > >  esac
> > > > done
> > > > "
> > > > (there is probably a better way to get the path of the crosstools
> >
> > nm...)
> >
> > > > And then added the following to src/win32/lib/Makefile:
> > > >
> > > > "
> > > > bacula32.def: $(DLL_OBJS)
> > > >         ./mk_def.sh $(DLL_OBJS) >bacula32.def
> > > > "
> > > > (and a dependency on bacula.dll for bacula32.def)
> > > >
> > > > And while being hideously ugly, it works for 32 bit builds at least
> >
> > and
> >
> > > > means no more manual tinkering with the file. That's the 15 minute
> > > > version, I can probably come up with something a lot better if you'd
> > > > consider accepting it... shall I bother? What constraints do you
> >
> > need to
> >
> > > > impose to make it work on all build environments?
> > > >
> > > > Thanks
> > > >
> > > > James
> >

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to