From: Frans S. <fra...@gm...> - 2010-03-02 14:42:47
|
Well, your .zip doesn't seem to run on an intel mac with 10.5. I have found a workaround for the libiconv problem. Just delete the /opt/local/lib/libiconv.dylib file (or move it somewhere else). now you can make a symbolic link: ln -s /usr/lib/libiconv.dylib /opt/local/lib/libiconv.dylib I also had to build gettext myself now from source and of course wxWidgets 2.9.0. Kind regards, Frans Schreuder On Tue, 2010-03-02 at 09:05 +0100, Lukas Zeller wrote: > Good morning! > > On Mar 2, 2010, at 8:31 , Frans Schreuder wrote: > > > This information might be interesting for other people as well, so I > > forwarded it to the mailing list as well... > > I will have a look on how to generate the right makefiles to load the > > libiconv from /usr/lib, but I am very happy that you have succeeded! > > > > I still have one question: > > the version you built, was it version 831 or 818? (you call it 818). > > Sorry, my fault (it was late yesterday). Of course, it's the 831, only the name of the .zip is wrong. The About box reads: > > > Best Regards, > > Lukas > > > > > -----Original Message----- > > From: Lukas Zeller <lu...@ha...> > > To: fra...@gm... > > Subject: Re: usbpicprog software for mac - I might be able to build > > these but also need help.. > > Date: Tue, 2 Mar 2010 00:41:25 +0100 > > > > Hello, > > > > good news: I managed to compile usbpicprog-831 on my Snow Leopard Intel Mac, and it runs fine (inlcluding the Bangap bit reset feature I desperately needed to recover my 12F629). I sent the .app to a colleague with a non-develper mac, where it runs as well. > > > > However there were a few obstacles: > > > > 1) All ports need to be installed in the "universal" variant on Snow Leopard. Otherwise, only the 64bit versions are installed, but as wx needs carbon and carbon is 32-bit only, the entire build must be forced to 32bit, including libusb. > > > > 2) The build instructions your gave me for wx must be adapted for Snow Leopard to force 32bit compilation: > > > >> first you need to get wxWidgets 2.9.0 from http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.9.0.tar.gz > >> extract the source package, and run the following commands from the wxWidgets-2.9.0 folder: > >> mkdir build-mac > >> cd build-mac > >> ../configure --disable-shared > >> make > >> sudo make install > > > > luz version: > > > >> mkdir build-mac > >> cd build-mac > >> arch_flags="-arch i386" > >> ../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --disable-shared > >> make > >> sudo make install > > > > > > 3) buildmac.sh needs some tweaks: > > > > a) To force 32-bit compilation: instead of > > > > ./configure --prefix=${OUTPUTPATH}/src/usbpicprog.app/Contents/MacOS/output > > > > use > > > > arch_flags="-arch i386" > > ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --prefix=${OUTPUTPATH}/src/usbpicprog.app/Contents/MacOS/output > > > > > > b) Because wx is not created as a dylib at all, but apparently used statically (--disable-shared), libwx_osx_carbonu-2.9.dylib does not exist and can't be copied. So, instead of > > > > TARGETS="libusb-1.0.dylib "\ > > "libwx_osx_carbonu-2.9.dylib" > > > > use > > > > TARGETS="libusb-1.0.dylib" > > > > > > 4) Apparently, a copy of libusb-1.0.dylib needs to be present in libs/ - so I copied the one from MacPorts: > > > > cp /opt/local/lib/libusb-1.0.dylib libs > > > > > > 5) The most difficult part: it seems that something with Macport's libiconv is wrong (found some other refs on google to this problem), so when linking the binary, the linker should use the libiconv provided by Apple (in /usr/lib). If I put "-L/usr/lib" before "-liconv" in src/Makefile, the "make all" in src/ works. However, as Makefile/Makefile.in is autogen'ed and the WX_LIBS macros come from wx-config output, this is not easily fixable. > > My ugly hack was to pause the ./buildmac.sh in the right moment with Ctrl-S in the console, and then manually edit src/Makefile ;-/ > > Probably the solution would be to compile wx differently rather than hacking wx-config's output that way... > > > > > > I hope all this is useful for you. At least, the built app is attached. > > > > Of course, for the longer term it'll be great if the build could be refined such that one can pull the head from your svn and run a build script to create new Mac versions. > > > > For now, I'm happy as this now revived my 12F629 project that was stalled in a permanent reset condition due to BG=00 :-) > > > > Best Regards, > > > > Lukas Zeller (lu...@ha...) > > > > > > > Lukas Zeller (lu...@ha...) > |