# libxml compile error



## mazzz86 (Jan 4, 2010)

Hi guys,

I'm running FreeBSD 8.0 

When I try to install the port ruby (/usr/ports/lang/ruby18), I get this error which make my compilation fail.
I get the same error for lots of other ports :


```
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" 
-DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 
-DLIBXML_STATIC -I../intl -I./libcroco -I/usr/local/include -O2 -pipe -fno-strict-aliasing
 -c term-styled-ostream.c  -fPIC -DPIC -o .libs/term-styled-ostream.o
In file included from ./libxml/parser.h:797,
                 from ./libxml/globals.h:19,
                 from ./libxml/threads.h:36,
                 from ./libxml/xmlmemory.h:217,
                 from ./libxml/tree.h:1205,
                 from ./libcroco/cr-sel-eng.h:34,
                 from term-styled-ostream.oo.c:26:
./libxml/encoding.h:137: error: expected specifier-qualifier-list before 'iconv_t'
*** Error code 1
```

I tried to fix it with this solution :
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21249&group_id=494

But I didnt really understand where I need to do it.
Am I the only one having this problem ?
Is there any other solution ?

Thanks guys


----------



## DutchDaemon (Jan 4, 2010)

If it happens for a lot of ports, then how do you compile?


----------



## mazzz86 (Jan 4, 2010)

I usually use : _make install clean_

It happens for lots of ports cause they all need ruby18 which need libxml

Thanks


----------



## DutchDaemon (Jan 4, 2010)

What is your version of libtool?


----------



## mazzz86 (Jan 4, 2010)

libtool version is 2.2.6b


----------



## DutchDaemon (Jan 4, 2010)

As far as I can see, libxml is not in Ruby's dependency list (in fact, libxml doesn't show up anywhere in Ruby's build process). I just built Ruby18 (http://www.pastebin.org/71022), and it threw no fatal error.


----------



## mazzz86 (Jan 4, 2010)

So do you got any idea ?

I double checked what i was saying :

```
#pwd
#/usr/ports/lang/ruby18
# make
```

and I give you all the result whithout doing a "make clean" before:


```
===>   ruby+oniguruma-1.8.7.160_5,1 depends on file: /nonexistent - not found
===>    Verifying patch for /nonexistent in /usr/ports/devel/oniguruma
===>   Returning to build of ruby+oniguruma-1.8.7.160_5,1
===>   ruby+oniguruma-1.8.7.160_5,1 depends on file: /usr/local/bin/automake-1.10 - not found
===>    Verifying install for /usr/local/bin/automake-1.10 in /usr/ports/devel/automake110
===>   automake-1.10.1 depends on file: /usr/local/bin/perl5.8.9 - found
===>   automake-1.10.1 depends on file: /usr/local/bin/autoconf-2.62 - not found
===>    Verifying install for /usr/local/bin/autoconf-2.62 in /usr/ports/devel/autoconf262
===>   autoconf-2.62 depends on executable: gm4 - found
===>   autoconf-2.62 depends on executable: help2man - not found
===>    Verifying install for help2man in /usr/ports/misc/help2man
===>   help2man-1.36.4_3 depends on file: /usr/local/lib/perl5/site_perl/5.8.9/mach/Locale/gettext.pm - not found
===>    Verifying install for /usr/local/lib/perl5/site_perl/5.8.9/mach/Locale/gettext.pm in /usr/ports/devel/p5-Locale-gettext
===>   p5-gettext-1.05_2 depends on file: /usr/local/bin/perl5.8.9 - found
===>   p5-gettext-1.05_2 depends on shared library: intl - not found
===>    Verifying install for intl in /usr/ports/devel/gettext
===>  Building for gettext-0.17_1
Making all in gnulib-local
Making all in gettext-runtime
make  all-recursive
Making all in doc
Making all in intl
Making all in intl-java
cd . && test ! -d /usr/lib/jdk1.3.1 || env PATH=/usr/lib/jdk1.3.1/bin:$PATH javadoc -d javadoc2 gnu.gettext gnu/gettext/*.java
Making all in intl-csharp
Making all in gnulib-lib
make  all-am
Making all in libasprintf
make  all-am
Making all in src
Making all in po
Making all in man
Making all in m4
Making all in tests
Making all in gettext-tools
make  all-recursive
Making all in doc
Making all in intl
Making all in gnulib-lib
make  all-am
/bin/sh /usr/local/bin/libtool --tag=CC    --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"  -DEXEEXT=\"\" -I. -I..   
-I../intl -I../intl  -I.. -I.. -DDEPENDS_ON_LIBICONV=1  -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl    -I./libcroco  -I/usr/local
/include  -O2 -pipe -fno-strict-aliasing -c -o term-styled-ostream.lo term-styled-ostream.c
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. 
-DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -I./libcroco -I/usr/local/include -O2 -pipe -fno-strict-aliasing -c 
term-styled-ostream.c  -fPIC -DPIC -o .libs/term-styled-ostream.o
In file included from ./libxml/parser.h:797,
                 from ./libxml/globals.h:19,
                 from ./libxml/threads.h:36,
                 from ./libxml/xmlmemory.h:217,
                 from ./libxml/tree.h:1205,
                 from ./libcroco/cr-sel-eng.h:34,
                 from term-styled-ostream.oo.c:26:
./libxml/encoding.h:137: error: expected specifier-qualifier-list before 'iconv_t'
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.17/gettext-tools/gnulib-lib.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.17/gettext-tools/gnulib-lib.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.17/gettext-tools.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.17/gettext-tools.
*** Error code 1

Stop in /usr/ports/devel/gettext/work/gettext-0.17.
*** Error code 1

Stop in /usr/ports/devel/gettext.
*** Error code 1

Stop in /usr/ports/devel/p5-Locale-gettext.
*** Error code 1

Stop in /usr/ports/misc/help2man.
*** Error code 1

Stop in /usr/ports/devel/autoconf262.
*** Error code 1

Stop in /usr/ports/devel/automake110.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
*** Error code 1
```


----------



## DutchDaemon (Jan 4, 2010)

Can you try building Ruby _without_ the ONIGURUMA option (remove it in 'make config', and run a 'make clean' before proceeding)? If you don't need it, don't use it. That's the option that's (indirectly) pulling in libxml.

Furthermore, make sure _all_ of your ports are up-to-date (`pkg_version -L=`), and that you read the specific instructions for updating certain ports (e.g. gettext) in /usr/ports/UPDATING. 

I managed to build Ruby with ONIGURUMA just fine, by the way. All my ports were up-to-date before that.


----------



## mazzz86 (Jan 4, 2010)

ONIGURUMA was already off in the Makefile :


```
OPTIONS=        ONIGURUMA "Build with oniguruma regular expressions lib" off \
                IPV6 "Enable IPv6 support" on \
                RDOC "Build and install Rdoc indexes" on \
                DEBUG "Compile-in debug info" off
```

Anyway I removed it, make clean, but nothing better

pkg_version -v return me only up-to-date packages
and nothing interesting in usr/ports/UPDATING

I spend like one week dealing with this problem before posting here. I don't know what more to do...

By the way thanks for your reactivity


----------



## DutchDaemon (Jan 4, 2010)

Your output showed you were building *"ruby+oniguruma-1.8.7.160_5,1"*, which only happens with the ONIGURUMA option on.

The Makefile only presents the defaults (the input for 'make config' which can be overruled). What is the output of 'make config' in the Ruby port directory? Is ONIGURUMA checked [X]?

And can you run [cmd=]portsnap fetch update && pkg_version -L=[/cmd] just to make sure you're up-to-date?


----------



## mazzz86 (Jan 4, 2010)

You were right, I unchecked it but still the same error
Output is now *"ruby-1.8.7.160_5,1"*


----------



## DutchDaemon (Jan 4, 2010)

If your ports tree and installed ports are up-to-date, I advise you to reinstall libtool and everything that depends on it. 

Something in the chain is broken, and since libtool reports/introduces the error, I guess you may have omitted the 20090802 part of /usr/ports/UPDATING.

Try:
`# portupgrade -rf libtool\*`
Or:
`# portmaster -Rr libtool\*`


----------



## mazzz86 (Jan 4, 2010)

I need ruby18 which need libxml to install portupgrade ^^

But i think I found something.
I didn't get all the ports tree and forgot ports/converters where libiconv is.

Compiling at the moment...

Do you advise me to get the ports-all directive in my "csup ports-supfile" ?
I only chose interesting packages for this computer. Maybe it's a mistake


----------



## mazzz86 (Jan 4, 2010)

It works now. It was ports/converters which to be there

Thank you DutchDaemon ! Keep going


----------



## DutchDaemon (Jan 4, 2010)

I advise you to switch to portsnap(8) for updating your ports tree, and to use csup only for updating your OS sources.


----------

