Thread: [Mysql-cocoa-users] Problem compiling a Universal Binary
Brought to you by:
sergecohen
|
From: Jeff K. <kop...@gm...> - 2005-06-17 01:26:59
|
At WWDC, I was trying to get my favorite Cocoa app, CocoaMySQL, to compile as a Universal Binary. The CocoaMySQL code worked fine, but naturally, my binary SMySQL framework hadn't been ported for the i386 yet. I've tried a number of times, but Xcode 2.1 seems to have some problems dealing with the framework code and its new habitat under Xcode 2.1. Have there been attempts to produce a Universal Binary version of the SMySQL framework yet, and if so, what changes were necessary to get the thing to compile? I was tempted to copy the errors and such into this message, but I'm really not sure they would have been much help, since there are so many settings and configurations that go into Xcode compiling. Lemme know if there's something specific that would help. Thanks, -Jeff. :) Jeff Kopmanis kop...@gm... http://www.kopmanis.com |
|
From: Aaron J. <aj...@ed...> - 2005-06-17 04:21:17
Attachments:
PGP.sig
|
Jeff, What were the errors? I use the SMySQL source files in my project for work, and have produced a universal binary for that project without any errors. I don't have an Intel machine to test it on and thus don't know if it runs, but there were no compiler errors. Aaron Jacobs On Jun 16, 2005, at 8:26 PM, Jeff Kopmanis wrote: > At WWDC, I was trying to get my favorite Cocoa app, CocoaMySQL, to > compile as a Universal Binary. The CocoaMySQL code worked fine, > but naturally, my binary SMySQL framework hadn't been ported for > the i386 yet. I've tried a number of times, but Xcode 2.1 seems to > have some problems dealing with the framework code and its new > habitat under Xcode 2.1. > > Have there been attempts to produce a Universal Binary version of > the SMySQL framework yet, and if so, what changes were necessary to > get the thing to compile? > > I was tempted to copy the errors and such into this message, but > I'm really not sure they would have been much help, since there are > so many settings and configurations that go into Xcode compiling. > Lemme know if there's something specific that would help. > > Thanks, > > -Jeff. :) > > Jeff Kopmanis > kop...@gm... > http://www.kopmanis.com |
|
From: Jeff K. <kop...@gm...> - 2005-06-17 04:38:48
|
I haven't gotten the same errors twice, unfortunately. The current one is: /usr/bin/libtool: can't locate file for: -lmysqlclient.12.0.0 /usr/bin/libtool: file: -lmysqlclient.12.0.0 is not an object file (not allowed in a library) The last one complained about cclobj not being present for gcc-3.3, which was puzzling, since gcc-4.0 is supposed to be the current compiler (I checked that with gcc_select). Did you have to set any paths or other particulars? Also, there are alot of warnings regarding stuff like bad return types, bad typing and such, but nothing that claimed it was going to break stuff. Oh...I'd assumed that if there are precompiled headers that I'd need to recompile those as well...is that true? I'll admit my programming skills are a bit rusty, but this really seems to be less obvious than it could be. Serves me right for staying in system admin for so long... Thanks, -Jeff. :) On Jun 17, 2005, at 12:20 AM, Aaron Jacobs wrote: > Jeff, > > What were the errors? I use the SMySQL source files in my project > for work, and have produced a universal binary for that project > without any errors. I don't have an Intel machine to test it on > and thus don't know if it runs, but there were no compiler errors. > > Aaron Jacobs > > > On Jun 16, 2005, at 8:26 PM, Jeff Kopmanis wrote: > > >> At WWDC, I was trying to get my favorite Cocoa app, CocoaMySQL, to >> compile as a Universal Binary. The CocoaMySQL code worked fine, >> but naturally, my binary SMySQL framework hadn't been ported for >> the i386 yet. I've tried a number of times, but Xcode 2.1 seems >> to have some problems dealing with the framework code and its new >> habitat under Xcode 2.1. >> >> Have there been attempts to produce a Universal Binary version of >> the SMySQL framework yet, and if so, what changes were necessary >> to get the thing to compile? >> >> I was tempted to copy the errors and such into this message, but >> I'm really not sure they would have been much help, since there >> are so many settings and configurations that go into Xcode >> compiling. Lemme know if there's something specific that would help. >> >> Thanks, >> >> -Jeff. :) >> >> Jeff Kopmanis >> kop...@gm... >> http://www.kopmanis.com > Jeff Kopmanis kop...@gm... http://www.kopmanis.com |
|
From: Aaron J. <aj...@ed...> - 2005-06-17 12:29:46
Attachments:
PGP.sig
|
I'm not using it as a framework or a library or anything. All I have in my project is the source for the classes I need as well as the libmysql_client library and the libmysql headers, since it depends on those. The only warning I get is "Possible missing call to [super dealloc]" for MCPNumber. I've been meaning to fix that myself, but the MCPNumber class is designed really weirdly and I don't know if there's a reason for that. Aaron On Jun 16, 2005, at 11:38 PM, Jeff Kopmanis wrote: > I haven't gotten the same errors twice, unfortunately. > > The current one is: > /usr/bin/libtool: can't locate file for: -lmysqlclient.12.0.0 > /usr/bin/libtool: file: -lmysqlclient.12.0.0 is not an object file > (not allowed in a library) > > The last one complained about cclobj not being present for gcc-3.3, > which was puzzling, since gcc-4.0 is supposed to be the current > compiler (I checked that with gcc_select). > > Did you have to set any paths or other particulars? Also, there > are alot of warnings regarding stuff like bad return types, bad > typing and such, but nothing that claimed it was going to break stuff. > > Oh...I'd assumed that if there are precompiled headers that I'd > need to recompile those as well...is that true? > > I'll admit my programming skills are a bit rusty, but this really > seems to be less obvious than it could be. Serves me right for > staying in system admin for so long... > > Thanks, > > -Jeff. :) > > On Jun 17, 2005, at 12:20 AM, Aaron Jacobs wrote: > > >> Jeff, >> >> What were the errors? I use the SMySQL source files in my project >> for work, and have produced a universal binary for that project >> without any errors. I don't have an Intel machine to test it on >> and thus don't know if it runs, but there were no compiler errors. >> >> Aaron Jacobs >> >> >> On Jun 16, 2005, at 8:26 PM, Jeff Kopmanis wrote: >> >> >> >>> At WWDC, I was trying to get my favorite Cocoa app, CocoaMySQL, >>> to compile as a Universal Binary. The CocoaMySQL code worked >>> fine, but naturally, my binary SMySQL framework hadn't been >>> ported for the i386 yet. I've tried a number of times, but Xcode >>> 2.1 seems to have some problems dealing with the framework code >>> and its new habitat under Xcode 2.1. >>> >>> Have there been attempts to produce a Universal Binary version of >>> the SMySQL framework yet, and if so, what changes were necessary >>> to get the thing to compile? >>> >>> I was tempted to copy the errors and such into this message, but >>> I'm really not sure they would have been much help, since there >>> are so many settings and configurations that go into Xcode >>> compiling. Lemme know if there's something specific that would >>> help. >>> >>> Thanks, >>> >>> -Jeff. :) >>> >>> Jeff Kopmanis >>> kop...@gm... >>> http://www.kopmanis.com >>> >> >> > > Jeff Kopmanis > kop...@gm... > http://www.kopmanis.com > > > |
|
From: Aaron J. <aj...@ed...> - 2005-06-17 12:36:41
Attachments:
PGP.sig
|
Of course, perhaps I should have tried this before I sent the e- mail. I guess I built the wrong target when I tested before. I'm getting an error, but I don't think it's the same as yours. My error is because the copy of libmysqlclient I have is built for ppc only, so it won't link it to an i386 binary. Does anyone know how I could build an i386 copy of libmysqlclient.a? Aaron On Jun 17, 2005, at 7:29 AM, Aaron Jacobs wrote: > I'm not using it as a framework or a library or anything. All I > have in my project is the source for the classes I need as well as > the libmysql_client library and the libmysql headers, since it > depends on those. The only warning I get is "Possible missing call > to [super dealloc]" for MCPNumber. I've been meaning to fix that > myself, but the MCPNumber class is designed really weirdly and I > don't know if there's a reason for that. > > Aaron > > > On Jun 16, 2005, at 11:38 PM, Jeff Kopmanis wrote: > > >> I haven't gotten the same errors twice, unfortunately. >> >> The current one is: >> /usr/bin/libtool: can't locate file for: -lmysqlclient.12.0.0 >> /usr/bin/libtool: file: -lmysqlclient.12.0.0 is not an object file >> (not allowed in a library) >> >> The last one complained about cclobj not being present for >> gcc-3.3, which was puzzling, since gcc-4.0 is supposed to be the >> current compiler (I checked that with gcc_select). >> >> Did you have to set any paths or other particulars? Also, there >> are alot of warnings regarding stuff like bad return types, bad >> typing and such, but nothing that claimed it was going to break >> stuff. >> >> Oh...I'd assumed that if there are precompiled headers that I'd >> need to recompile those as well...is that true? >> >> I'll admit my programming skills are a bit rusty, but this really >> seems to be less obvious than it could be. Serves me right for >> staying in system admin for so long... >> >> Thanks, >> >> -Jeff. :) |
|
From: Jeff K. <kop...@gm...> - 2005-06-20 01:57:28
|
If I'm not mistaken, I've always gotten the binary from the MySQL folks (mysql.com). I'm guessing that a Universal Binary will need to be compiled to get a Universal Binary libmysqlclient.a. Sound sane? I'll give it a whirl, but I'm notoriously bad at getting these things to work. If anyone else has done this before, go for it...no ego to bruise here. :) -Jeff. On Jun 17, 2005, at 8:36 AM, Aaron Jacobs wrote: > Of course, perhaps I should have tried this before I sent the e- > mail. I guess I built the wrong target when I tested before. I'm > getting an error, but I don't think it's the same as yours. My > error is because the copy of libmysqlclient I have is built for ppc > only, so it won't link it to an i386 binary. > > Does anyone know how I could build an i386 copy of libmysqlclient.a? > > Aaron > > > On Jun 17, 2005, at 7:29 AM, Aaron Jacobs wrote: > > >> I'm not using it as a framework or a library or anything. All I >> have in my project is the source for the classes I need as well as >> the libmysql_client library and the libmysql headers, since it >> depends on those. The only warning I get is "Possible missing >> call to [super dealloc]" for MCPNumber. I've been meaning to fix >> that myself, but the MCPNumber class is designed really weirdly >> and I don't know if there's a reason for that. >> >> Aaron >> >> >> On Jun 16, 2005, at 11:38 PM, Jeff Kopmanis wrote: >> >> >> >>> I haven't gotten the same errors twice, unfortunately. >>> >>> The current one is: >>> /usr/bin/libtool: can't locate file for: -lmysqlclient.12.0.0 >>> /usr/bin/libtool: file: -lmysqlclient.12.0.0 is not an object >>> file (not allowed in a library) >>> >>> The last one complained about cclobj not being present for >>> gcc-3.3, which was puzzling, since gcc-4.0 is supposed to be the >>> current compiler (I checked that with gcc_select). >>> >>> Did you have to set any paths or other particulars? Also, there >>> are alot of warnings regarding stuff like bad return types, bad >>> typing and such, but nothing that claimed it was going to break >>> stuff. >>> >>> Oh...I'd assumed that if there are precompiled headers that I'd >>> need to recompile those as well...is that true? >>> >>> I'll admit my programming skills are a bit rusty, but this really >>> seems to be less obvious than it could be. Serves me right for >>> staying in system admin for so long... >>> >>> Thanks, >>> >>> -Jeff. :) > Jeff Kopmanis kop...@gm... http://www.kopmanis.com |
|
From: Aaron J. <aj...@ed...> - 2005-06-20 02:00:38
Attachments:
PGP.sig
|
Well it's not going to be as easy as checking a box in Xcode, since libmysqlclient.a isn't built by an Xcode project. Apple has a description of how to do it with a Makefile-based project, but I don't know if that applies to libraries or only programs. I'll look into it when I have some time, but let us know if you figure it out. Aaron On Jun 19, 2005, at 8:57 PM, Jeff Kopmanis wrote: > If I'm not mistaken, I've always gotten the binary from the MySQL > folks (mysql.com). I'm guessing that a Universal Binary will need > to be compiled to get a Universal Binary libmysqlclient.a. > > Sound sane? > > I'll give it a whirl, but I'm notoriously bad at getting these > things to work. If anyone else has done this before, go for > it...no ego to bruise here. :) > > -Jeff. > > > On Jun 17, 2005, at 8:36 AM, Aaron Jacobs wrote: > > >> Of course, perhaps I should have tried this before I sent the e- >> mail. I guess I built the wrong target when I tested before. I'm >> getting an error, but I don't think it's the same as yours. My >> error is because the copy of libmysqlclient I have is built for >> ppc only, so it won't link it to an i386 binary. >> >> Does anyone know how I could build an i386 copy of libmysqlclient.a? >> >> Aaron >> >> >> On Jun 17, 2005, at 7:29 AM, Aaron Jacobs wrote: >> >> >> >>> I'm not using it as a framework or a library or anything. All I >>> have in my project is the source for the classes I need as well >>> as the libmysql_client library and the libmysql headers, since it >>> depends on those. The only warning I get is "Possible missing >>> call to [super dealloc]" for MCPNumber. I've been meaning to fix >>> that myself, but the MCPNumber class is designed really weirdly >>> and I don't know if there's a reason for that. >>> >>> Aaron >>> >>> >>> On Jun 16, 2005, at 11:38 PM, Jeff Kopmanis wrote: >>> >>> >>> >>> >>>> I haven't gotten the same errors twice, unfortunately. >>>> >>>> The current one is: >>>> /usr/bin/libtool: can't locate file for: -lmysqlclient.12.0.0 >>>> /usr/bin/libtool: file: -lmysqlclient.12.0.0 is not an object >>>> file (not allowed in a library) >>>> >>>> The last one complained about cclobj not being present for >>>> gcc-3.3, which was puzzling, since gcc-4.0 is supposed to be the >>>> current compiler (I checked that with gcc_select). >>>> >>>> Did you have to set any paths or other particulars? Also, there >>>> are alot of warnings regarding stuff like bad return types, bad >>>> typing and such, but nothing that claimed it was going to break >>>> stuff. >>>> >>>> Oh...I'd assumed that if there are precompiled headers that I'd >>>> need to recompile those as well...is that true? >>>> >>>> I'll admit my programming skills are a bit rusty, but this >>>> really seems to be less obvious than it could be. Serves me >>>> right for staying in system admin for so long... >>>> >>>> Thanks, >>>> >>>> -Jeff. :) >>>> >> >> > > Jeff Kopmanis > kop...@gm... > http://www.kopmanis.com > > > |