I'm trying to build on Mac Leopard 10.5.8 since the binary download only works on Snow Leopard. I know this worked a few versions ago, but now near the end of the build, I get a number of errors like this one:
ERROR: "strip: for architecture x86_64 object: /klayout-0.21.6/bin.mac-leopard-gcc-release/klayout.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui malformed object (unknown load command 5)
"
ERROR: ""
And many other similar ones complaining about what must be other parts of Qt. I tried updating to the newest (for Leopard) version of Xcode, and installed the newest (4.7.1) Qt, neither of which helped. Any ideas?
Comments
Hi Jimmy,
I am not quite familiar with MacOS builds (I don't make the MacOS binaries myself), but I found one post which describes a similar problem here:
http://www.cocoaforge.com/viewtopic.php?f=6&t=21261
Frankly I don't quite understand what the message is. They mention a bug in Xcode 3.2.
You also mentioned that is working some versions ago. Maybe it's possible to take the config tree and build script from that version.
Is there anybody else who could help?
Best regards,
Matthias
Undefined symbols:
"QFrame::QFrame(QWidget*, char const*, QFlags<Qt::WindowType>)", referenced from:
....
etc...
I also tried compiling version 0.20.2, since that's the one I successfully built before, but it gives the same error now. So there must be something messed up in my Qt and/or Xcode installation. ?
Hi Jimmy,
the QFrame constructor mentioned in the error message is a special one which is only provided if the code is compiled with -DQT3_SUPPORT (which is the case) and the Qt library is built with Qt3 support. Usually that is the case but depending on the origin of your library, that feature may have been switched off.
BTW: for the next major release I have removed all Qt3 dependencies so Qt3 support is no longer required. However that version is far from being released yet.
Best regards,
Matthias
Thanks for the help! There are two binary packages for Qt on Mac, a Carbon and Cocoa. The Cocoa one apparently does not have the Qt3Support library included. I installed the carbon version and it builds and runs ok.
However (sorry to keep bothering you), when I try to open an existing GDS, which I saved using a prior version, I get the error:
HEADER record expected (position=600, record number=0, cell=)
If I open a GDS saved with this version:
Unexpected end-of-file (position=4, record number=0, cell=)
Saving seems to work ok, because I can open the saved GDS in the 0.20.2 version (which I just rebuilt).
Hi Jimmy,
that is really weired. There should not be any difference in GDS files saved by this or other versions.
The error message indicates that there is something very basic wrong, like something with the fopen function.
Are you able to open the test files provided in the testdata directory? It would be interesting to know whether you can open oasis or gds2_txt files.
Best regards,
Matthias
Something must have changed between 0.20.2 and 0.21 that broke it, since I can build and run 0.20.2 fine, but the errors show up on 0.21. This is really strange....
Hi Jimmy,
One thing that has changed is the handling of UTF8 encoding locales. But that should make it better, not worse. In the case of GDS files, the reader uses the zlib which I assume is active in your case. I am not aware that zlib is encoding sensitive, especially since the file is opened in binary mode, but maybe it's worth a try to do the following:
Best regards,
Matthias
LANG="C"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
I don't know what the difference is between the two zlibs, or what other repercussions this might have, but it seems to be working this way.
Hi Jimmy,
that is very good input. Thanks for the analysis.
In fact, you're right. There is something different with respect to the zlib. For 0.21 I was including a copy of the code (zlib 1.2.5). This way it was much more convenient to build on Windows. Apparently there is something wrong with that copy for MacOS 10.5.8 or with my build settings. On 10.6. it seems to work.
As you mentioned for 10.5.8 or maybe MacOS in general, the best solution is to revert to the zlib provided with the system. I'd do it like this:
From src/Makefile.body disable line 483 (delete or comment):
In config/Makefile.conf.mac-leopard-gcc-release add -lz to line 30:
I provided this description for others who may have the same problem.
Thanks and best regards,
Matthias