From kevin.clark at gmail.com Thu Oct 5 02:06:15 2006 From: kevin.clark at gmail.com (Kevin Clark) Date: Wed, 4 Oct 2006 23:06:15 -0700 Subject: [Mkrf-users] [ANN] Mkrf 0.1.2 Released Message-ID: Hi guys, Tonight I'm pleased to announce a new release of mkrf. The gem repositories should be updated soonish. Major improvements include easier access to compiler flags and better defaults. If you're interested in the project you may like to join the mailing list (http://rubyforge.org/mailman/listinfo/mkrf-users). = What is mkrf? mkrf was created as a Google Summer of Code project and is used for creating Rakefiles to build C extensions to Ruby. mkrf is intended as a replacement for mkmf. Major goals of mkrf include a simple interface with proper documentation and easy code reuse for related projects like RubyGems. -- Kevin Clark http://glu.ttono.us From jmg3000 at gmail.com Sun Oct 8 01:05:03 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Sun, 8 Oct 2006 01:05:03 -0400 Subject: [Mkrf-users] [ANN] Mkrf 0.1.2 Released In-Reply-To: References: Message-ID: <65e0bb520610072205u1fd8537cx339f9210f676ee89@mail.gmail.com> On 10/5/06, Kevin Clark wrote: > Hi guys, > Tonight I'm pleased to announce a new release of mkrf. The gem > repositories should be updated soonish. Major improvements include > easier access to compiler flags and better defaults. > Hi, I just committed a couple of fixes for 0.1.2, and it now works for my module. Incidentally, the tests were -- erroneously, I believe -- passing *before* the fixes. I haven't looked into why that was. Also made a small change to the gemspec so the README should now show up as the main front page when you go to the html rdocs. ---John From Daniel.Berger at qwest.com Mon Oct 9 16:19:56 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Mon, 09 Oct 2006 14:19:56 -0600 Subject: [Mkrf-users] Questions and comments about mkrf from a first time user Message-ID: <452AAEEC.9070600@qwest.com> Hi, I'm just giving mkrf a spin here. Here are a few questions and suggestions. What's the recommended way to send things to stdout? I'd like that in addition to the log file. I'd kinda like an echo to stdout to be the default, actually. Anyway, I think I might be doing something wrong. I've got a simple extconf.rb file that looks something like this: require 'mkrf' Mkrf::Generator.new('sys/admin') do |g| g.has_function?("getlogin_r") g.has_function?("getlogin") g.has_function?("getenv") end The log file looks ok: # Logfile created on Mon Oct 09 14:10:46 MDT 2006 by logger.rb/1.5.2.7 I, [2006-10-09T14:10:47.495899 #21783] INFO -- : Function found: getlogin_r() I, [2006-10-09T14:10:47.620518 #21783] INFO -- : Function found: getlogin() I, [2006-10-09T14:10:47.746671 #21783] INFO -- : Function found: getenv() I, [2006-10-09T14:10:47.749610 #21783] INFO -- : Rakefile written However, the Rakefile doesn't seem to generate any macros: CFLAGS = " " What did I do wrong? However, this is all somewhat moot for me. It appears that you've got "CC" hardcoded to "gcc" at the moment. That's not going to work on every platform. It won't work on my Solaris box, for example, where I'm using the free Sun Studio compiler. May I recommend setting that to something like: CC = ENV["CC"] || system("which cc") || "gcc" On Windows, you could code that as ENV["CC"] || "cl". Along those lines, what about using ENV["LDFLAGS"], etc, when building the Rakefile? It doesn't seem to pick those up. Ok, back to the rakefile itself - what tasks are supposed to be generated? The only one I see is "rake clean". Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From jmg3000 at gmail.com Tue Oct 10 00:04:34 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Tue, 10 Oct 2006 00:04:34 -0400 Subject: [Mkrf-users] Questions and comments about mkrf from a first time user In-Reply-To: <452AAEEC.9070600@qwest.com> References: <452AAEEC.9070600@qwest.com> Message-ID: <65e0bb520610092104w33f25564te40695ff37777f0f@mail.gmail.com> On 10/9/06, Daniel Berger wrote: > Hi, > >[snip] > > Anyway, I think I might be doing something wrong. I've got a simple extconf.rb > file that looks something like this: > > require 'mkrf' > > Mkrf::Generator.new('sys/admin') do |g| > g.has_function?("getlogin_r") > g.has_function?("getlogin") > g.has_function?("getenv") > end > > The log file looks ok: > > # Logfile created on Mon Oct 09 14:10:46 MDT 2006 by logger.rb/1.5.2.7 > I, [2006-10-09T14:10:47.495899 #21783] INFO -- : Function found: getlogin_r() > I, [2006-10-09T14:10:47.620518 #21783] INFO -- : Function found: getlogin() > I, [2006-10-09T14:10:47.746671 #21783] INFO -- : Function found: getenv() > I, [2006-10-09T14:10:47.749610 #21783] INFO -- : Rakefile written > > However, the Rakefile doesn't seem to generate any macros: > > CFLAGS = " " > > What did I do wrong? You might try grabbing the most recent source from svn. I fixed what I think was a bug related to this. > However, this is all somewhat moot for me. It appears that you've got "CC" > hardcoded to "gcc" at the moment. That's not going to work on every platform. > It won't work on my Solaris box, for example, where I'm using the free Sun > Studio compiler. > > May I recommend setting that to something like: > > CC = ENV["CC"] || system("which cc") || "gcc" Actually, I think Config::CONFIG['CC'] might be what we want here. Does that work for you on your system? > On Windows, you could code that as ENV["CC"] || "cl". > > Along those lines, what about using ENV["LDFLAGS"], etc, when building the > Rakefile? It doesn't seem to pick those up. Again, you might try what's in svn. Thanks, ---John From jmg3000 at gmail.com Tue Oct 10 00:31:02 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Tue, 10 Oct 2006 00:31:02 -0400 Subject: [Mkrf-users] Questions and comments about mkrf from a first time user In-Reply-To: <65e0bb520610092104w33f25564te40695ff37777f0f@mail.gmail.com> References: <452AAEEC.9070600@qwest.com> <65e0bb520610092104w33f25564te40695ff37777f0f@mail.gmail.com> Message-ID: <65e0bb520610092131o226ae467o700fec3c6e082fb1@mail.gmail.com> On 10/10/06, John Gabriele wrote: > On 10/9/06, Daniel Berger wrote: > [snip] > > > However, this is all somewhat moot for me. It appears that you've got "CC" > > hardcoded to "gcc" at the moment. That's not going to work on every platform. > > It won't work on my Solaris box, for example, where I'm using the free Sun > > Studio compiler. > > > > May I recommend setting that to something like: > > > > CC = ENV["CC"] || system("which cc") || "gcc" > > Actually, I think Config::CONFIG['CC'] might be what we want here. > Does that work for you on your system? Ok, I added that change to svn too. Let us know if it works for you. :) ---John From Daniel.Berger at qwest.com Tue Oct 10 10:49:37 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 10 Oct 2006 09:49:37 -0500 Subject: [Mkrf-users] Questions and comments about mkrf from a firsttime user In-Reply-To: <65e0bb520610092104w33f25564te40695ff37777f0f@mail.gmail.com> Message-ID: <39AA6550E5AA554AB1456707D6E5563D0259E872@QTOMAE2K3M01.AD.QINTRA.COM> > -----Original Message----- > From: mkrf-users-bounces at rubyforge.org > [mailto:mkrf-users-bounces at rubyforge.org] On Behalf Of John Gabriele > Sent: Monday, October 09, 2006 10:05 PM > To: mkrf-users at rubyforge.org > Subject: Re: [Mkrf-users] Questions and comments about mkrf > from a firsttime user > > > On 10/9/06, Daniel Berger wrote: > > Hi, > > > >[snip] > > > > Anyway, I think I might be doing something wrong. I've got > a simple > > extconf.rb file that looks something like this: > > > > require 'mkrf' > > > > Mkrf::Generator.new('sys/admin') do |g| > > g.has_function?("getlogin_r") > > g.has_function?("getlogin") > > g.has_function?("getenv") > > end > > > > The log file looks ok: > > > > # Logfile created on Mon Oct 09 14:10:46 MDT 2006 by > logger.rb/1.5.2.7 > > I, [2006-10-09T14:10:47.495899 #21783] INFO -- : Function found: > > getlogin_r() I, [2006-10-09T14:10:47.620518 #21783] INFO -- : > > Function found: getlogin() I, [2006-10-09T14:10:47.746671 #21783] > > INFO -- : Function found: getenv() I, [2006-10-09T14:10:47.749610 > > #21783] INFO -- : Rakefile written > > > > However, the Rakefile doesn't seem to generate any macros: > > > > CFLAGS = " " > > > > What did I do wrong? > > You might try grabbing the most recent source from svn. I > fixed what I think was a bug related to this. Ok, I'll check it out, thanks. > > However, this is all somewhat moot for me. It appears that > you've got > > "CC" hardcoded to "gcc" at the moment. That's not going to > work on every platform. > > It won't work on my Solaris box, for example, where I'm using the > > free Sun Studio compiler. > > > > May I recommend setting that to something like: > > > > CC = ENV["CC"] || system("which cc") || "gcc" > > Actually, I think Config::CONFIG['CC'] might be what we want > here. Does that work for you on your system? Ah, yes, I forgot that rbconfig stored that information. In fact, there's a whole bunch of flags you might want to pull from that, now that I think about it - LDFLAGS, etc. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From kevin.clark at gmail.com Tue Oct 10 13:09:11 2006 From: kevin.clark at gmail.com (Kevin Clark) Date: Tue, 10 Oct 2006 10:09:11 -0700 Subject: [Mkrf-users] Questions and comments about mkrf from a firsttime user In-Reply-To: <39AA6550E5AA554AB1456707D6E5563D0259E872@QTOMAE2K3M01.AD.QINTRA.COM> References: <65e0bb520610092104w33f25564te40695ff37777f0f@mail.gmail.com> <39AA6550E5AA554AB1456707D6E5563D0259E872@QTOMAE2K3M01.AD.QINTRA.COM> Message-ID: Dan, A good amount of the defaults in mkrf are pulled from rbconfig. If you notice places where the defaults should come from there but don't (in svn) do tell us about it. I'll get it fixed ASAP. -- Kevin Clark http://glu.ttono.us From brian.takita at gmail.com Thu Oct 12 03:15:02 2006 From: brian.takita at gmail.com (Brian Takita) Date: Thu, 12 Oct 2006 00:15:02 -0700 Subject: [Mkrf-users] Compiling extensions on Windows Message-ID: <1d7ddd110610120015l688928c8p1473200ff42f67bd@mail.gmail.com> Hello, I just started using mkrf for my Fast JSON project ( http://rubyforge.org/projects/fjson) It works great on Linux, however I'm having trouble compiling it on Windows. So far I have not been successful compiling any ruby extensions on Windows. Can somebody give me some pointers? I noticed that the Rakefile is trying to use gcc. Am I supposed to use Mingw? Thank you, Brian Takita -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061012/c08d76f7/attachment.html From jmg3000 at gmail.com Thu Oct 12 10:04:44 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Thu, 12 Oct 2006 10:04:44 -0400 Subject: [Mkrf-users] Compiling extensions on Windows In-Reply-To: <1d7ddd110610120015l688928c8p1473200ff42f67bd@mail.gmail.com> References: <1d7ddd110610120015l688928c8p1473200ff42f67bd@mail.gmail.com> Message-ID: <65e0bb520610120704w7129a4b2yea1729cb871fe3a3@mail.gmail.com> On 10/12/06, Brian Takita wrote: > Hello, > > [snip] > > I noticed that the Rakefile is trying to use gcc. [snip] Hi Brian, The fix for that is in svn but not in the 0.1.2 release. ---John From brian.takita at gmail.com Sat Oct 14 02:25:44 2006 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 13 Oct 2006 23:25:44 -0700 Subject: [Mkrf-users] Compiling extensions on Windows In-Reply-To: <65e0bb520610120704w7129a4b2yea1729cb871fe3a3@mail.gmail.com> References: <1d7ddd110610120015l688928c8p1473200ff42f67bd@mail.gmail.com> <65e0bb520610120704w7129a4b2yea1729cb871fe3a3@mail.gmail.com> Message-ID: <1d7ddd110610132325vf0a1efeu7c4517559a9d629@mail.gmail.com> On 10/12/06, John Gabriele wrote: > > On 10/12/06, Brian Takita wrote: > > Hello, > > > > [snip] > > > > I noticed that the Rakefile is trying to use gcc. [snip] > > Hi Brian, > > The fix for that is in svn but not in the 0.1.2 release. Great. I was also wondering if we could compile against Mingw on Linux. Do you think such an extension would work on Windows? ---John > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061013/296b188b/attachment.html From brian.takita at gmail.com Sun Oct 15 18:55:20 2006 From: brian.takita at gmail.com (Brian Takita) Date: Sun, 15 Oct 2006 15:55:20 -0700 Subject: [Mkrf-users] RubyGems Packaging Message-ID: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> Hello, I'm trying to package my library as a Gem. Since mkrf uses Rakefiles instead of Makefiles, the default Gem build_extensions method doesn't seem to work with mkrf. Has anybody been sucessful in packing a mkrf extension as a gem? Thank you, Brian Takita -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061015/a7a6db7d/attachment.html From kevin.clark at gmail.com Mon Oct 16 00:38:55 2006 From: kevin.clark at gmail.com (Kevin Clark) Date: Sun, 15 Oct 2006 21:38:55 -0700 Subject: [Mkrf-users] RubyGems Packaging In-Reply-To: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> References: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> Message-ID: Hi Brian, I haven't done this yet (you're the first to ask about it) but I'm eager to get it working. Do you have error output, or maybe the files you're trying to bundle so I can play with it on my end? Kev On 10/15/06, Brian Takita wrote: > Hello, > > I'm trying to package my library as a Gem. > Since mkrf uses Rakefiles instead of Makefiles, the default Gem > build_extensions method doesn't seem to work with mkrf. > > Has anybody been sucessful in packing a mkrf extension as a gem? > > Thank you, > Brian Takita > > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > > > -- Kevin Clark http://glu.ttono.us From brian.takita at gmail.com Mon Oct 16 02:33:14 2006 From: brian.takita at gmail.com (Brian Takita) Date: Sun, 15 Oct 2006 23:33:14 -0700 Subject: [Mkrf-users] RubyGems Packaging In-Reply-To: References: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> Message-ID: <1d7ddd110610152333i3759f5c6gd76971fc460ec4fc@mail.gmail.com> On 10/15/06, Kevin Clark wrote: > > Hi Brian, > I haven't done this yet (you're the first to ask about it) but I'm > eager to get it working. Do you have error output, or maybe the files > you're trying to bundle so I can play with it on my end? This error happened while installing the Gem. Building native extensions. This could take a while... ERROR: Error installing gem fjson[.gem]: ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/fjson- 0.0.1 for inspection. In rubygems/installer.rb, at the Gem::ExtExtConfBuilder.make method, you will see that it expects a Makefile to be generated by extconf.rb. I'm not yet sure how to change this. Perhaps Rubygems has some sort of event handler. Brian Kev > > On 10/15/06, Brian Takita wrote: > > Hello, > > > > I'm trying to package my library as a Gem. > > Since mkrf uses Rakefiles instead of Makefiles, the default Gem > > build_extensions method doesn't seem to work with mkrf. > > > > Has anybody been sucessful in packing a mkrf extension as a gem? > > > > Thank you, > > Brian Takita > > > > _______________________________________________ > > Mkrf-users mailing list > > Mkrf-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mkrf-users > > > > > > > > > -- > Kevin Clark > http://glu.ttono.us > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061015/fb0eb564/attachment.html From brian.takita at gmail.com Mon Oct 16 04:12:05 2006 From: brian.takita at gmail.com (Brian Takita) Date: Mon, 16 Oct 2006 01:12:05 -0700 Subject: [Mkrf-users] RubyGems Packaging In-Reply-To: <1d7ddd110610152333i3759f5c6gd76971fc460ec4fc@mail.gmail.com> References: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> <1d7ddd110610152333i3759f5c6gd76971fc460ec4fc@mail.gmail.com> Message-ID: <1d7ddd110610160112g7acd5de9u372747398fc1fa25@mail.gmail.com> On 10/15/06, Brian Takita wrote: > > On 10/15/06, Kevin Clark wrote: > > > > Hi Brian, > > I haven't done this yet (you're the first to ask about it) but I'm > > eager to get it working. Do you have error output, or maybe the files > > you're trying to bundle so I can play with it on my end? > > > This error happened while installing the Gem. > > Building native extensions. This could take a while... > > ERROR: Error installing gem fjson[.gem]: ERROR: Failed to build gem > native extension. > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/fjson-0.0.1 for inspection. > > > In rubygems/installer.rb, at the Gem::ExtExtConfBuilder.make method, you > will see that it expects a Makefile to be generated by extconf.rb. > I'm not yet sure how to change this. Perhaps Rubygems has some sort of > event handler. > You can pass a Rakefile to the extension list. This rake file must have the following tasks: - default (compiles the project) - install (installs the binaries) - cleanup (cleans up the intermediate build files) Brian > > Kev > > > > On 10/15/06, Brian Takita wrote: > > > Hello, > > > > > > I'm trying to package my library as a Gem. > > > Since mkrf uses Rakefiles instead of Makefiles, the default Gem > > > build_extensions method doesn't seem to work with mkrf. > > > > > > Has anybody been sucessful in packing a mkrf extension as a gem? > > > > > > Thank you, > > > Brian Takita > > > > > > _______________________________________________ > > > Mkrf-users mailing list > > > Mkrf-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mkrf-users > > > > > > > > > > > > > > > -- > > Kevin Clark > > http://glu.ttono.us > > _______________________________________________ > > Mkrf-users mailing list > > Mkrf-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mkrf-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061016/0e292f47/attachment-0001.html From kevin.clark at gmail.com Mon Oct 16 12:08:30 2006 From: kevin.clark at gmail.com (Kevin Clark) Date: Mon, 16 Oct 2006 09:08:30 -0700 Subject: [Mkrf-users] RubyGems Packaging In-Reply-To: <1d7ddd110610160112g7acd5de9u372747398fc1fa25@mail.gmail.com> References: <1d7ddd110610151555k49afdd6fo3ddb61c79db80c2a@mail.gmail.com> <1d7ddd110610152333i3759f5c6gd76971fc460ec4fc@mail.gmail.com> <1d7ddd110610160112g7acd5de9u372747398fc1fa25@mail.gmail.com> Message-ID: Hey Bryan, Thanks for looking into this. I'll try to get that fixed up today or tomorrow. On 10/16/06, Brian Takita wrote: > On 10/15/06, Brian Takita wrote: > > On 10/15/06, Kevin Clark wrote: > > > > > Hi Brian, > > > I haven't done this yet (you're the first to ask about it) but I'm > > > eager to get it working. Do you have error output, or maybe the files > > > you're trying to bundle so I can play with it on my end? > > > > > > This error happened while installing the Gem. > > > > Building native extensions. This could take a while... > > > > ERROR: Error installing gem fjson[.gem]: ERROR: Failed to build gem > native extension. > > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/fjson-0.0.1 for > inspection. > > > > In rubygems/installer.rb, at the Gem::ExtExtConfBuilder.make method, you > will see that it expects a Makefile to be generated by extconf.rb. > > I'm not yet sure how to change this. Perhaps Rubygems has some sort of > event handler. > > You can pass a Rakefile to the extension list. This rake file must have the > following tasks: > > default (compiles the project) > install (installs the binaries) > cleanup (cleans up the intermediate build files) > > > > Brian > > > > > > > Kev > > > > > > On 10/15/06, Brian Takita wrote: > > > > Hello, > > > > > > > > I'm trying to package my library as a Gem. > > > > Since mkrf uses Rakefiles instead of Makefiles, the default Gem > > > > build_extensions method doesn't seem to work with mkrf. > > > > > > > > Has anybody been sucessful in packing a mkrf extension as a gem? > > > > > > > > Thank you, > > > > Brian Takita > > > > > > > > _______________________________________________ > > > > Mkrf-users mailing list > > > > Mkrf-users at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/mkrf-users > > > > > > > > > > > > > > > > > > > > > -- > > > Kevin Clark > > > http://glu.ttono.us > > > _______________________________________________ > > > Mkrf-users mailing list > > > Mkrf-users at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/mkrf-users > > > > > > > > > > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > > > -- Kevin Clark http://glu.ttono.us From aaron_patterson at speakeasy.net Sun Oct 22 17:08:20 2006 From: aaron_patterson at speakeasy.net (Aaron Patterson) Date: Sun, 22 Oct 2006 14:08:20 -0700 Subject: [Mkrf-users] mkrf on OS X Message-ID: <20061022210820.GA8676@eviladmins.lan> Hi, I've got a very simple Mkrf generator: Mkrf::Generator.new('my_test', 'ext/my_test/*.c') It creates a Rakefile with LDSHARED listed as such: LDSHARED = "cc $(RC_CFLAGS) -bundle " Unfortunately when I try to compile, it tried to execute the command 'RC_FLAGS': cc $(RC_CFLAGS) -bundle -L"/usr/lib/ruby/1.8" -o my_test.bundle ext/my_test/my_test.o -lpthread -ldl -lobjc -lruby sh: line 1: RC_CFLAGS: command not found I think LDSHARED to be this: LDSHARED = "cc $RC_CFLAGS -bundle " Any hints? Have I created my generator improperly? -Aaron -- Aaron Patterson http://tenderlovemaking.com/ From kevin.clark at gmail.com Mon Oct 23 02:36:39 2006 From: kevin.clark at gmail.com (Kevin Clark) Date: Sun, 22 Oct 2006 23:36:39 -0700 Subject: [Mkrf-users] mkrf on OS X In-Reply-To: <20061022210820.GA8676@eviladmins.lan> References: <20061022210820.GA8676@eviladmins.lan> Message-ID: Hi Aaron, mkrf pulls the LDSHARED string from rbconfig (and your additions) which remembers how ruby itself was built. Here's what it looks like on mine: >> require 'rbconfig' => true >> Config::CONFIG['LDSHARED'] => "cc -dynamic -bundle -undefined suppress -flat_namespace" Sounds like your ruby was built with strange flags. I'm not quite sure how to fix it. Right now you can't override LDSHARED as a whole (though maybe you should be able to). Anyone have an opinion on this? On 10/22/06, Aaron Patterson wrote: > Hi, > > I've got a very simple Mkrf generator: > Mkrf::Generator.new('my_test', 'ext/my_test/*.c') > > It creates a Rakefile with LDSHARED listed as such: > LDSHARED = "cc $(RC_CFLAGS) -bundle " > > Unfortunately when I try to compile, it tried to execute the command > 'RC_FLAGS': > > cc $(RC_CFLAGS) -bundle -L"/usr/lib/ruby/1.8" -o my_test.bundle > ext/my_test/my_test.o -lpthread -ldl -lobjc -lruby > sh: line 1: RC_CFLAGS: command not found > > I think LDSHARED to be this: > LDSHARED = "cc $RC_CFLAGS -bundle " > > Any hints? Have I created my generator improperly? > > -Aaron > > -- > Aaron Patterson > http://tenderlovemaking.com/ > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > -- Kevin Clark http://glu.ttono.us From aaron_patterson at speakeasy.net Mon Oct 23 22:17:56 2006 From: aaron_patterson at speakeasy.net (Aaron Patterson) Date: Mon, 23 Oct 2006 19:17:56 -0700 Subject: [Mkrf-users] mkrf on OS X In-Reply-To: References: <20061022210820.GA8676@eviladmins.lan> Message-ID: <20061024021756.GA17466@eviladmins.lan> On Sun, Oct 22, 2006 at 11:36:39PM -0700, Kevin Clark wrote: > Hi Aaron, > mkrf pulls the LDSHARED string from rbconfig (and your additions) > which remembers how ruby itself was built. Here's what it looks like > on mine: > > >> require 'rbconfig' > => true > >> Config::CONFIG['LDSHARED'] > => "cc -dynamic -bundle -undefined suppress -flat_namespace" > > Sounds like your ruby was built with strange flags. I don't know if it was strange flags..... I was just trying this against the ruby that comes with OS X by default. I know it is 1.8.2, but this seems like something mkrf should handle.... [aaron at aaron-pattersons-powerbook58 aaron]$ ruby -v ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0] [aaron at aaron-pattersons-powerbook58 aaron]$ which ruby /usr/bin/ruby [aaron at aaron-pattersons-powerbook58 aaron]$ -- Aaron Patterson http://tenderlovemaking.com/ From jmg3000 at gmail.com Mon Oct 23 23:14:22 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Mon, 23 Oct 2006 23:14:22 -0400 Subject: [Mkrf-users] mkrf on OS X In-Reply-To: <20061024021756.GA17466@eviladmins.lan> References: <20061022210820.GA8676@eviladmins.lan> <20061024021756.GA17466@eviladmins.lan> Message-ID: <65e0bb520610232014w1b086b35y10b33169960bf8a6@mail.gmail.com> Aaron, I think the current 0.1.2 release may be broken. You might try using what's in svn instead. Kev, were you going to do a release with what you have now, or are you working on some other part of mkrf at the moment? (I ask since I believe you gave a talk on mkrf at Rubyconf, so I'm guessing you got plenty of feedback! :) ) ---John From brian.takita at gmail.com Tue Oct 24 01:44:04 2006 From: brian.takita at gmail.com (Brian Takita) Date: Mon, 23 Oct 2006 22:44:04 -0700 Subject: [Mkrf-users] mkrf on OS X In-Reply-To: <65e0bb520610232014w1b086b35y10b33169960bf8a6@mail.gmail.com> References: <20061022210820.GA8676@eviladmins.lan> <20061024021756.GA17466@eviladmins.lan> <65e0bb520610232014w1b086b35y10b33169960bf8a6@mail.gmail.com> Message-ID: <1d7ddd110610232244i62345872ufe5449d78d9d979@mail.gmail.com> On 10/23/06, John Gabriele wrote: > > Aaron, I think the current 0.1.2 release may be broken. You might try > using what's in svn instead. At Rubyconf I got the FJson gem working on my coworker's Mac using mkrf. Kev, were you going to do a release with what you have now, or are you > working on some other part of mkrf at the moment? (I ask since I > believe you gave a talk on mkrf at Rubyconf, so I'm guessing you got > plenty of feedback! :) ) I can't wait for the release. ---John > _______________________________________________ > Mkrf-users mailing list > Mkrf-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mkrf-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061023/465ffaad/attachment.html From brian.takita at gmail.com Thu Oct 26 16:14:30 2006 From: brian.takita at gmail.com (Brian Takita) Date: Thu, 26 Oct 2006 13:14:30 -0700 Subject: [Mkrf-users] Fwd: Update on Your Request {42824} In-Reply-To: <9b1892ab0610260729h4bc40c6do7d715846ee5672fa@mail.gmail.com> References: <289e8ff33571852f336c49cc93aeef3c@help.textdrive.com> <9b1892ab0610260729h4bc40c6do7d715846ee5672fa@mail.gmail.com> Message-ID: <1d7ddd110610261314u1aa71742q9e9268900671b1e@mail.gmail.com> Here is an issue using mkrf on Freebsd at Textdrive. ---------- Forwarded message ---------- From: Dav Yaginuma Date: Oct 26, 2006 7:29 AM Subject: Fwd: Update on Your Request {42824} To: Brian Takita this make any sense to you? i was trying to get fjson installed on textdrive and ended up asking them to try to do it for me system wide... ---------- Forwarded message ---------- From: Help @ TextDrive Date: Oct 26, 2006 6:02 AM Subject: Update on Your Request {42824} To: dav at serve.com Hi Dav, [root at nicola]# rake (in /usr/local/lib/ruby/gems/1.8/gems/fjson-0.0.5) rake (in /usr/local/lib/ruby/gems/1.8/gems/fjson-0.0.5/ext/json_ext) cc -shared -L"/usr/local/lib/ruby/1.8" -o json_ext.so ./json_ext.o -lcrypt -lm -l-pthread /usr/bin/ld: cannot find -l-pthread rake aborted! Command failed with status (1): [cc -shared -L"/usr/local/lib/ruby/1.8" -o...] /usr/local/lib/ruby/gems/1.8/gems/fjson-0.0.5/ext/json_ext/Rakefile:30 (See full trace by running task with --trace) rake aborted! Command failed with status (1): [rake] so it had the wrong argument for the compiler ("-l-pthread", probably meant "-lpthread") So i fixed ext/json_ext/Rakefile and i had to do that for all the ext/*/Rakefile's one by one as I went one step further through the compile phase. But I still couldn't make rubygems pick it up. You may want to contact the author (it seems to be the mkrf lib creating the Rakefiles) about these issues on freebsd 6.1 Regards, Johan ++++++++++++++++++++++++++++++++ View the complete request history: https://help.textdrive.com/index.php?pg=request.check&id=42824azyqxu Request access key: 42824azyqxu -- Dav Yaginuma http://AkuAku.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mkrf-users/attachments/20061026/531a8601/attachment.html