# Problem building math/xspread



## Ozric (Jul 29, 2021)

I tried building math/xspread but it gave me an error on libpthread even though I have it installed as far as I can see:



```
===> License GPLv2+ accepted by the user
===> xspread-3.1.1c_4 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by xspread-3.1.1c_4 for building
===> Extracting for xspread-3.1.1c_4
=> SHA256 Checksum OK for xspread_3.1.1c.orig.tar.gz.
===> Patching for xspread-3.1.1c_4
===> Applying FreeBSD patches for xspread-3.1.1c_4 from /usr/ports/math/xspread/files
===> xspread-3.1.1c_4 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===> xspread-3.1.1c_4 depends on file: /usr/local/libdata/pkgconfig/xau.pc - found
===> xspread-3.1.1c_4 depends on file: /usr/local/libdata/pkgconfig/xcb.pc - found
===> xspread-3.1.1c_4 depends on file: /usr/local/libdata/pkgconfig/xdmcp.pc - found
===> xspread-3.1.1c_4 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===> xspread-3.1.1c_4 depends on shared library: libpthread-stubs.so - not found
===> xspread-3.1.1c_4 depends on shared library: libpthread-stubs.so - not found
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/math/xspread
*** Error code 1

Stop.
make: stopped in /usr/ports/math/xspread

===>>> make build failed for math/xspread
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
portmaster <flags> math/xspread

This command has been saved to ~/portmasterfail.txt
```


```
# pkg info | grep libpthread
libpthread-stubs-0.4 Weak aliases for pthread functions
```


----------



## SirDice (Jul 29, 2021)

Any reason why you're not using the packages?


----------



## Ozric (Jul 29, 2021)

SirDice said:


> Any reason why you're not using the packages?


Because I want this number to be as low as possible:


```
pkg info | wc -l
```

and that is accomplished when I can remove features from ports when building them.


----------



## SirDice (Jul 29, 2021)

There isn't much to remove on math/xspread. And it looks like you're only adding dependencies now, the X11 option is off by default.


----------



## SirDice (Jul 29, 2021)

Looking a little further, I think the port has an error in it and it's testing for the wrong file when checking for devel/libpthread-stubs.


```
X11_LIB_DEPENDS=	libpthread-stubs.so:devel/libpthread-stubs
```
That should be:

```
X11_LIB_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
```

There's no maintainer for this port, so I suggest opening a PR for it and supplying a patch. Then the port can be fixed.


----------



## Ozric (Jul 29, 2021)

SirDice said:


> There isn't much to remove on math/xspread. And it looks like you're only adding dependencies now, the X11 option is off by default.



Yes, but everything else on this system is installed with ports, and from what I understand it's a bad idea to start installing packages for some things when everything else is installed from ports.


----------

