Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install on freebsd9 #9

Open
g3d opened this issue Feb 23, 2012 · 15 comments

Comments

@g3d
Copy link

commented Feb 23, 2012

Tried to install gem with defined icu path on freebsd 9

[root@freebsd ~]# gem install charlock_holmes -- --with-icu-dir=/usr/local/share/icu/4.8.1.1/
Building native extensions.  This could take a while...
ERROR:  Error installing charlock_holmes:
    ERROR: Failed to build gem native extension.

        /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-icu-dir=/usr/local/share/icu/4.8.1.1/
checking for main() in -licui18n... no
checking for main() in -licui18n... no


***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
    --with-icu-dir
    --with-icu-include
    --without-icu-include=${icu-dir}/include
    --with-icu-lib
    --without-icu-lib=${icu-dir}/lib
    --with-icui18nlib
    --without-icui18nlib
    --with-icui18nlib
    --without-icui18nlib


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p290/gems/charlock_holmes-0.6.8 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.2-p290/gems/charlock_holmes-0.6.8/ext/charlock_holmes/gem_make.out

System information:

[root@freebsd ~]# uname -a
FreeBSD freebsd 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

[root@freebsd ~]# ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-freebsd9.0]
@brianmario

This comment has been minimized.

Copy link
Owner

commented Feb 23, 2012

What are the contents of that /usr/local/share/icu/4.8.1.1/ directory?

Are you sure that's the location where the headers and libraries are?

@g3d

This comment has been minimized.

Copy link
Author

commented Feb 23, 2012

It`s the target directory for the icu port.

[root@freebsd /usr/local/share/icu/4.8.1.1]# ls -Rla
total 20
drwxr-xr-x  3 root  wheel   512 Feb 23 03:08 .
drwxr-xr-x  3 root  wheel   512 Feb 23 03:08 ..
drwxr-xr-x  2 root  wheel   512 Feb 23 03:08 config
-r--r--r--  1 root  wheel  1981 Feb 23 03:08 license.html
-r-xr-xr-x  1 root  wheel   935 Feb 23 03:08 mkinstalldirs

./config:
total 12
drwxr-xr-x  2 root  wheel   512 Feb 23 03:08 .
drwxr-xr-x  3 root  wheel   512 Feb 23 03:08 ..
-r--r--r--  1 root  wheel  1824 Feb 23 03:08 mh-bsd-gcc
@brianmario

This comment has been minimized.

Copy link
Owner

commented Feb 23, 2012

Where are the libraries and headers?

@g3d

This comment has been minimized.

Copy link
Author

commented Feb 23, 2012

how can i install it in freebsd?

@brianmario

This comment has been minimized.

Copy link
Owner

commented Feb 23, 2012

Assuming you installed icu from a freebsd package, the library could be in /usr/lib or even /usr/local/lib - have you tried installing the gem without specifying the --with-icu-dir option?

@g3d

This comment has been minimized.

Copy link
Author

commented Feb 24, 2012

yes, of course. i find that option in error report from installing the gem without specifying the --with-icu-dir option

@jirihelmich

This comment has been minimized.

Copy link

commented Mar 7, 2012

Hi, I was experiencig the same problem. After many hours, I finally found a solution for FreeBSD:

gem install charlock_holmes -- --with-icu-dir=/usr/lib --with-opt-include=/usr/local/include/

@sun-yr

This comment has been minimized.

Copy link

commented May 2, 2012

you have this lib "libicu-dev" ??

@sun-yr

This comment has been minimized.

Copy link

commented May 2, 2012

#3 look at this

@herrBeesch

This comment has been minimized.

Copy link

commented Nov 14, 2012

Got it working on freeBSD with this patch https://github.com/brianmario/charlock_holmes/pull/20/files

and installing icu (I installed it from source, not from ports, may work also) and setting these options

gem install charlock_holmes -- --with-opt-include=/usr/local/include/ --with-opt-lib=/usr/local/lib/

or

bundle config build.charlock_holmes --with-opt-include=/usr/local/include/ --with-opt-lib=/usr/local/lib/
@krzysztofantczak

This comment has been minimized.

Copy link

commented Oct 16, 2013

it works as expected under fbsd after installing devel/icu from ports

@hmschreiner

This comment has been minimized.

Copy link

commented Jul 8, 2015

Thanks a lot, @jirihelmich! You saved my day! haha! I was about 3-4 hours looking for a solution for this issue! 👍

@jirihelmich

This comment has been minimized.

Copy link

commented Jul 8, 2015

@hmschreiner Glad to help!

@celadevra

This comment has been minimized.

Copy link

commented Sep 18, 2015

@herrBeesch Your solution works for me with FreeBSD 10.1. Thanks!

@aaronjwood

This comment has been minimized.

Copy link

commented Oct 12, 2016

I had to do a bit extra to get this working with GitLab's upgrade process:

sudo -u git -H bundle config build.charlock_holmes --with-icu-dir=/usr/lib --with-opt-include=/usr/local/include/
sudo -u git -H bundle install -j4

If you don't set the config the flags needed will never be used with bundle install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.