# Current-8.2 Xorg won't install - Parser.o not found



## mavediss (Apr 29, 2011)

Hi all,

I'm trying to install Xorg on a freshly installed FreeBSD box.


```
# uname -a
FreeBSD nyc.home 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 [email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```

The compilation stops in /usr/ports/textproc/p5-XML-Parser/work/XML-Parser-2.40 where it is complaining that it can't find the expat header.

The lib and includes are present on my system:


```
# ls -la /usr/local/lib/libexpat*
-rw-r--r--  1 root  wheel  160488 Apr 27 05:57 /usr/local/lib/libexpat.a
-rwxr-xr-x  1 root  wheel     793 Apr 27 05:57 /usr/local/lib/libexpat.la
lrwxrwxrwx  1 root  wheel      13 Apr 27 05:57 /usr/local/lib/libexpat.so -> libexpat.so.6
-rwxr-xr-x  1 root  wheel  165680 Apr 27 05:57 /usr/local/lib/libexpat.so.6
```


```
# ls -la /usr/local/include/expat*
-r--r--r--  1 root  wheel  40339 Apr 27 05:57 /usr/local/include/expat.h
-r--r--r--  1 root  wheel   3364 Apr 27 05:57 /usr/local/include/expat_external.h
```


```
# pkg_info | grep expat
expat-2.0.1_1       XML 1.0 parser written in C
```

I am getting the following error message:

```
# make
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Extracting for p5-XML-Parser-2.40
=> SHA256 Checksum OK for XML-Parser-2.40.tar.gz.
===>   p5-XML-Parser-2.40 depends on file: /usr/local/bin/perl5.10.1 - found
===>  Patching for p5-XML-Parser-2.40
===>   p5-XML-Parser-2.40 depends on file: /usr/local/bin/perl5.10.1 - found
===>   p5-XML-Parser-2.40 depends on file: /usr/local/bin/perl5.10.1 - found
===>   p5-XML-Parser-2.40 depends on shared library: expat.6 - found
===>  Configuring for p5-XML-Parser-2.40

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager.

Or you can download expat from:

[url]http://sourceforge.net/projects/expat/[/url]

If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:

    EXPATLIBPATH=...  To set the directory in which to find libexpat

    EXPATINCPATH=...  To set the directory in which to find expat.h

For example:

    perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.

Checking if your kit is complete...
Looks good
Warning: prerequisite LWP 0 not found.
Writing Makefile for XML::Parser::Expat
Writing Makefile for XML::Parser
===>  Building for p5-XML-Parser-2.40
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
cp Parser/Encodings/iso-8859-10.enc blib/lib/XML/Parser/Encodings/iso-8859-10.enc
cp Parser/Encodings/ibm866.enc blib/lib/XML/Parser/Encodings/ibm866.enc
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
cp Parser/Encodings/iso-8859-11.enc blib/lib/XML/Parser/Encodings/iso-8859-11.enc
cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc
cp Parser/Encodings/iso-8859-14.enc blib/lib/XML/Parser/Encodings/iso-8859-14.enc
cp Parser/Encodings/iso-8859-1.enc blib/lib/XML/Parser/Encodings/iso-8859-1.enc
cp Parser/Encodings/iso-8859-6.enc blib/lib/XML/Parser/Encodings/iso-8859-6.enc
cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc
cp Parser/Encodings/windows-1255.enc blib/lib/XML/Parser/Encodings/windows-1255.enc
cp Parser/Encodings/iso-8859-15.enc blib/lib/XML/Parser/Encodings/iso-8859-15.enc
cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc
cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc
cp Parser/LWPExternEnt.pl blib/lib/XML/Parser/LWPExternEnt.pl
cp Parser/Encodings/windows-1251.enc blib/lib/XML/Parser/Encodings/windows-1251.enc
cp Parser/Style/Debug.pm blib/lib/XML/Parser/Style/Debug.pm
cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
cp Parser/Encodings/koi8-r.enc blib/lib/XML/Parser/Encodings/koi8-r.enc
cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README
cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc
cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc
cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc
cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc
cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg
cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc
cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc
cp Parser/Style/Subs.pm blib/lib/XML/Parser/Style/Subs.pm
cp Parser/Encodings/iso-8859-13.enc blib/lib/XML/Parser/Encodings/iso-8859-13.enc
cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc
cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc
cp Parser/Style/Objects.pm blib/lib/XML/Parser/Style/Objects.pm
cp Parser.pm blib/lib/XML/Parser.pm
cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc
cp Parser/Style/Stream.pm blib/lib/XML/Parser/Style/Stream.pm
Running Mkbootstrap for XML::Parser ()
chmod 644 Parser.bs
rm -f blib/arch/auto/XML/Parser/Parser.so
cc  -shared  -L/usr/local/lib -fstack-protector Parser.o  -o blib/arch/auto/XML/Parser/Parser.so
cc: Parser.o: No such file or directory
cc: No input files specified
*** Error code 1

Stop in /usr/ports/textproc/p5-XML-Parser/work/XML-Parser-2.40.
*** Error code 1

Stop in /usr/ports/textproc/p5-XML-Parser.
```

I tried [cmd=]perl Makefile.PL EXPATLIBPATH=/usr/local/lib EXPATINCPATH=/usr/local/include[/cmd] in /usr/ports/textproc/p5-XML-Parser/work/XML-Parser-2.40 and then re-run a *make*, but I'm getting the same error message. 

I searched on google a lot but can't find any answer to solve this problem, where I can find a lot of people with the same issue.

A ticket with the similar issue has been opened but so fix has been posted yet : http://www.freebsd.org/cgi/query-pr.cgi?pr=155991

Please help.

Thank you.


----------



## SirDice (Apr 29, 2011)

Update the ports tree before starting to build anything. The ports tree on the install disks are rather dated.


----------



## mavediss (Apr 29, 2011)

Thanks for your answer but I installed the ports via csup


----------



## mavediss (Apr 29, 2011)

Well, looks like I solved the issue by installing the XML::Parser manually via CPAN.

For those who are having the same issue:


```
# perl -MCPAN -e shell
cpan> look XML::Parser
# perl Makefile.PL
# make
# make test (this will fail)
# make install (anyway)
```
Hope this helps.


----------



## wblock@ (Apr 30, 2011)

Maybe some problem in upgrading Perl from 5.8 to 5.10?  Regardless, going around it by manually installing the modules with CPAN is just painting over the problem.


----------



## mavediss (Apr 30, 2011)

This was a fresh install. Perl version 5.10 was already installed. I agree this is painting over the problem, but at least I'm able to compile the Xorg port (and other ports that were not compiling due to this issue as well).


----------



## Simba7 (Aug 16, 2011)

Thanks for the commands to install p5-XML-Parser. I was installing Cacti and this error came up.

This was with a fresh build with FreeBSD 8.2 and the latest portsnap.


----------



## pkubaj (Apr 12, 2012)

I've just run into the same issue. There's a PR for that: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155991 I just can't think of any reason why the patch is still not committed...


----------

