# Port installing error



## xNight (Aug 30, 2014)

Hello,

I think my problem is clear. I'm trying to install some ports (I mean all the ports give me the same error) then I get:

```
pkg-convert.o: In function `exec_convert':
convert.c:(.text+0x3e5): undefined reference to `dirfd'
../libpkg/.libs/libpkg.so: undefined reference to `archive_write_add_filter_gzip'
../libpkg/.libs/libpkg.so: undefined reference to `archive_write_add_filter_none'
../libpkg/.libs/libpkg.so: undefined reference to `archive_read_support_filter_all'
../libpkg/.libs/libpkg.so: undefined reference to `archive_write_add_filter_xz'
../libpkg/.libs/libpkg.so: undefined reference to `archive_read_support_filter_none'
../libpkg/.libs/libpkg.so: undefined reference to `archive_write_add_filter_bzip2'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.3.7/src
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.3.7
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.3.7
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/portmaster
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/portmaster
```
in this case I'm trying to install portmaster; I did  try with other ports but same at first I though that it was bcz because I had a library missing.

```
libssl.so.6
libmd.so.5
```
I made a symblic link to fix that but the rest is still the same (every thing was working fine until upgraded from 9.2 to 10.0).
Any idea on how to fix it and thanks in advance

edit: the file /usr/include/c++ is empty


----------



## SirDice (Sep 1, 2014)

After upgrading from 9.2 to 10.0 you have to rebuild or re-install _all_ ports or packages.


----------



## xNight (Sep 1, 2014)

SirDice said:
			
		

> After upgrading from 9.2 to 10.0 you have to rebuild or re-install _all_ ports or packages.


Sorry for this question but I have searched for some answer for this on google but people use portmaster to do this or something like this can you show me how?


----------



## interfasys (Sep 23, 2014)

You can't install ports-mgmt/pkg if you have archivers/libarchive installed.

Quickest solution is to delete libarchive. Best solution is to fix pkg so that it uses pkg-config when looking for libraries.


----------



## wblock@ (Sep 23, 2014)

xNight said:
			
		

> in this case I'm trying to install portmaster ; I did  try with other ports but same at first I though that it was bcz because I had a library missing.
> 
> ```
> libssl.so.6
> ...



That is not a fix, it is a short-term hack that has long-term implications: Thread 32311.

The right side of this diff shows the procedure to rebuild all ports: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=148481&action=diff


----------



## serpent7776 (Dec 10, 2014)

interfasys said:


> You can't install ports-mgmt/pkg if you have archivers/libarchive installed.
> 
> Quickest solution is to delete libarchive. Best solution is to fix pkg so that it uses pkg-config when looking for libraries.



It's a bit of an old thread, but this really helped me as I was having errors when compiling pkg-1.4.0. After I deleted archivers/libarchive ports-mgmt/pkg compiled successfully.
Thanks.


----------



## chrcol (May 25, 2015)

still broken over a year later, and before anyone asks yes I emailed the port maintainer.


----------

