[libxml-devel] Bug in extconf.rb

Sean Chittenden sean at chittenden.org
Wed Jul 16 17:05:41 EDT 2008


> Not sure.  In that one -I/usr/local/include wasn't added to the gcc  
> command line so linking to the iconv headers failed.
>
> My fix was for that was adding this line towards the end of  
> extconf.rb:
>
> $INCFLAGS << " -I/usr/local/include"
>
> Brute force I know...
>
> The way the file is setup, you could already do:
>
> ruby extconf.rb --with-incov-dir=/usr/local/include
>
> But it seems like including /usr/local/include is probably a good  
> idea (I hope, let me know if its not).


${PREFIX}/include is more correct for FreeBSD.  PREFIX is a make(1)  
variable, however, and I don't know how that info gets easily passed  
to mkmf.  I think you could probably do something like:

incpath = (path + ENV['PATH']).flatten.collect{|dir|  
File.expand_path(File.join(File.expand_path(dir), '../include')))}

I'm not wild about including the ENV['PATH'] bit (security), but the  
rest should nab most corner cases for users.  -sc

--
Sean Chittenden
sean at chittenden.org





More information about the libxml-devel mailing list