# Having trouble using wine (Undefined symbol "__pw_scan@FBSDprivate_1.0")



## gotdrip88 (Jun 26, 2022)

`$ winecfg
wine: could not load ntdll.so: /usr/lib32/libutil.so.9: Undefined symbol "__pw_scan@FBSDprivate_1.0"`
Is the error

first the error I was having was:








						Solved - Wine not working
					

I wanted to try Wine on FreeBSD (13.0-RELEASE).  I added emulators/wine to my poudriere's package list and built it without changing any options. Afterwards I simply installed it on a FreeBSD 13.0-RELEASE desktop machine using pkg install wine. That being said, I never used wine before.  Upon...




					forums.freebsd.org
				




Which I fixed with the command:
`$ doas mount -t procfs proc /proc`
which fixed the error but now I'm having the error I just mentioned.
Running FreeBSD 13.1 right now and wine version no idea cause same error.


----------



## zirias@ (Jun 28, 2022)

/usr/lib32/libutil.so.9 is part of base, so I'd say this is more likely a problem with your base installation – broken/failed upgrade?

On my 13.1 machine, this lib actually defines `__pw_scan`:

```
$ nm -D /usr/lib32/libutil.so.9 | grep __pw_scan
0000d4e0 T __pw_scan
```


----------



## gotdrip88 (Jun 28, 2022)

`$ nm -D /usr/lib32/libutil.so.9 | grep __pw_scan
         U __pw_scan`

These are my results running the command, I thought installation went fine.


----------



## zirias@ (Jun 28, 2022)

All I can say is `U` here means undefined, and that's probably not how it should be, at least for 13.1-RELEASE


----------



## SirDice (Jun 28, 2022)

What's the output of `freebsd-version -u`?


----------



## gotdrip88 (Jun 29, 2022)

SirDice said:


> What's the output of `freebsd-version -u`?


$  freebsd-version -u
13.1-RELEASE


----------



## SirDice (Jun 29, 2022)

How did you upgrade? It looks like it may have missed your lib32 libraries.


----------



## zirias@ (Jun 29, 2022)

The strange thing is, I checked my 12.3-RELEASE jail and there, this symbol is defined as well. 

@OP:
Which version did you last upgrade from (and how did you perform that upgrade)?
And: What architecture are you using? (I know, this is a bit far-fetched...)


----------



## gotdrip88 (Jun 29, 2022)

SirDice said:


> How did you upgrade? It looks like it may have missed your lib32 libraries.


I didn' t
I started from 13.1


----------



## SirDice (Jun 30, 2022)

Zirias said:


> I checked my 12.3-RELEASE jail and there, this symbol is defined as well.


Same here. Checked that too. But 12.3 is quite new, so it may be something that was added _after_ 13.0 and 12.2. I don't have a 13.0 or 12.2 anymore to check though.

Found an old 11.4 install.

```
% nm -D /usr/lib32/libutil.so.9 | grep __pw_scan
000070c0 T __pw_scan
```
It's there too.


----------



## shkhln (Jun 30, 2022)

gotdrip88 said:


> `$ nm -D /usr/lib32/libutil.so.9 | grep __pw_scan
> U __pw_scan`
> 
> These are my results running the command, I thought installation went fine.


`objdump -s --section .comment /usr/lib32/libutil.so.9`?


----------



## gotdrip88 (Jun 30, 2022)

shkhln said:


> `objdump -s --section .comment /usr/lib32/libutil.so.9`?


It returns:

```
$ objdump -s --section .comment /usr/lib32/libutil.so.9

/usr/lib32/libutil.so.9:     file format elf32-i386-freebsd

Contents of section .comment:
 0000 24467265 65425344 3a207265 6c656e67  $FreeBSD: releng
 0010 2f31312e 322f6c69 622f6373 752f6933  /11.2/lib/csu/i3
 0020 38362f63 7274692e 53203231 37313035  86/crti.S 217105
 0030 20323031 312d3031 2d303720 31363a30   2011-01-07 16:0
 0040 373a3531 5a206b69 62202400 46726565  7:51Z kib $.Free
 0050 42534420 636c616e 67207665 7273696f  BSD clang versio
 0060 6e20362e 302e3020 28746167 732f5245  n 6.0.0 (tags/RE
 0070 4c454153 455f3630 302f6669 6e616c20  LEASE_600/final 
 0080 33323635 36352920 28626173 6564206f  326565) (based o
 0090 6e204c4c 564d2036 2e302e30 29002446  n LLVM 6.0.0).$F
 00a0 72656542 53443a20 72656c65 6e672f31  reeBSD: releng/1
 00b0 312e322f 6c69622f 6c696275 74696c2f  1.2/lib/libutil/
 00c0 75756370 6c6f636b 2e632033 33313732  uucplock.c 33172
 00d0 32203230 31382d30 332d3239 2030323a  2 2018-03-29 02:
 00e0 35303a35 375a2065 61646c65 72202400  50:57Z eadler $.
 00f0 24467265 65425344 3a207265 6c656e67  $FreeBSD: releng
 0100 2f31312e 322f6c69 622f6c69 62757469  /11.2/lib/libuti
 0110 6c2f7265 616c686f 73746e61 6d652e63  l/realhostname.c
 0120 20333331 37323220 32303138 2d30332d   331722 2018-03-
 0130 32392030 323a3530 3a35375a 20656164  29 02:50:57Z ead
 0140 6c657220 24002446 72656542 53443a20  ler $.$FreeBSD: 
 0150 72656c65 6e672f31 312e322f 6c69622f  releng/11.2/lib/
 0160 6c696275 74696c2f 7074792e 63203333  libutil/pty.c 33
 0170 31373232 20323031 382d3033 2d323920  1722 2018-03-29 
 0180 30323a35 303a3537 5a206561 646c6572  02:50:57Z eadler
 0190 20240024 46726565 4253443a 2072656c   $.$FreeBSD: rel
 01a0 656e672f 31312e32 2f6c6962 2f6c6962  eng/11.2/lib/lib
 01b0 7574696c 2f70726f 70657274 792e6320  util/property.c 
 01c0 33333137 32322032 3031382d 30332d32  331722 2018-03-2
 01d0 39203032 3a35303a 35375a20 6561646c  9 02:50:57Z eadl
 01e0 65722024 00244672 65654253 443a2072  er $.$FreeBSD: r
 01f0 656c656e 672f3131 2e322f6c 69622f6c  eleng/11.2/lib/l
 0200 69627574 696c2f70 69646669 6c652e63  ibutil/pidfile.c
 0210 20333331 37323220 32303138 2d30332d   331722 2018-03-
 0220 32392030 323a3530 3a35375a 20656164  29 02:50:57Z ead
 0230 6c657220 24002446 72656542 53443a20  ler $.$FreeBSD: 
 0240 72656c65 6e672f31 312e322f 6c69622f  releng/11.2/lib/
 0250 6c696275 74696c2f 6c6f6769 6e5f7474  libutil/login_tt
 0260 792e6320 33333137 32322032 3031382d  y.c 331722 2018-
 0270 30332d32 39203032 3a35303a 35375a20  03-29 02:50:57Z 
 0280 6561646c 65722024 00244672 65654253  eadler $.$FreeBS
 0290 443a2072 656c656e 672f3131 2e322f6c  D: releng/11.2/l
 02a0 69622f6c 69627574 696c2f6c 6f67696e  ib/libutil/login
 02b0 5f6f6b2e 63203135 34343134 20323030  _ok.c 154414 200
 02c0 362d3031 2d313620 30303a32 383a3131  6-01-16 00:28:11
 02d0 5a207277 6174736f 6e202400 24467265  Z rwatson $.$Fre
 02e0 65425344 3a207265 6c656e67 2f31312e  eBSD: releng/11.
 02f0 322f6c69 622f6c69 62757469 6c2f6c6f  2/lib/libutil/lo
 0300 67696e5f 63727970 742e6320 33333137  gin_crypt.c 3317
 0310 32322032 3031382d 30332d32 39203032  22 2018-03-29 02
 0320 3a35303a 35375a20 6561646c 65722024  :50:57Z eadler $
 0330 00244672 65654253 443a2072 656c656e  .$FreeBSD: relen
 0340 672f3131 2e322f6c 69622f6c 69627574  g/11.2/lib/libut
 0350 696c2f6c 6f67696e 5f636c61 73732e63  il/login_class.c
 0360 20323936 37323320 32303136 2d30332d   296723 2016-03-
 0370 31322031 343a3534 3a33345a 206b6962  12 14:54:34Z kib
 0380 20240024 46726565 4253443a 2072656c   $.$FreeBSD: rel
 0390 656e672f 31312e32 2f6c6962 2f6c6962  eng/11.2/lib/lib
 03a0 7574696c 2f6c6f67 696e5f61 7574682e  util/login_auth.
 03b0 63203330 30313532 20323031 362d3035  c 300152 2016-05
 03c0 2d313820 31353a32 353a3435 5a207066  -18 15:25:45Z pf
 03d0 67202400 24467265 65425344 3a207265  g $.$FreeBSD: re
 03e0 6c656e67 2f31312e 322f6c69 622f6c69  leng/11.2/lib/li
 03f0 62757469 6c2f6b69 6e666f5f 67657476  butil/kinfo_getv
 0400 6d6f626a 6563742e 63203238 33363234  mobject.c 283624
 0410 20323031 352d3035 2d323720 31383a31   2015-05-27 18:1
 0420 313a3035 5a206a68 62202400 24467265  1:05Z jhb $.$Fre
 0430 65425344 3a207265 6c656e67 2f31312e  eBSD: releng/11.
 0440 322f6c69 622f6c69 62757469 6c2f6b69  2/lib/libutil/ki
 0450 6e666f5f 67657476 6d6d6170 2e632033  nfo_getvmmap.c 3
 0460 31323033 31203230 31372d30 312d3133  12031 2017-01-13
 0470 2030383a 33393a32 335a206e 67696520   08:39:23Z ngie 
 0480 24002446 72656542 53443a20 72656c65  $.$FreeBSD: rele
 0490 6e672f31 312e322f 6c69622f 6c696275  ng/11.2/lib/libu
 04a0 74696c2f 6b696e66 6f5f6765 7470726f  til/kinfo_getpro
 04b0 632e6320 33333137 32322032 3031382d  c.c 331722 2018-
 04c0 30332d32 39203032 3a35303a 35375a20  03-29 02:50:57Z 
 04d0 6561646c 65722024 00244672 65654253  eadler $.$FreeBS
 04e0 443a2072 656c656e 672f3131 2e322f6c  D: releng/11.2/l
 04f0 69622f6c 69627574 696c2f6b 696e666f  ib/libutil/kinfo
 0500 5f676574 616c6c70 726f632e 63203333  _getallproc.c 33
 0510 31373232 20323031 382d3033 2d323920  1722 2018-03-29 
 0520 30323a35 303a3537 5a206561 646c6572  02:50:57Z eadler
 0530 20240024 46726565 4253443a 2072656c   $.$FreeBSD: rel
 0540 656e672f 31312e32 2f6c6962 2f6c6962  eng/11.2/lib/lib
 0550 7574696c 2f6b696e 666f5f67 65746669  util/kinfo_getfi
 0560 6c652e63 20333132 30333120 32303137  le.c 312031 2017
 0570 2d30312d 31332030 383a3339 3a32335a  -01-13 08:39:23Z
 0580 206e6769 65202400 24467265 65425344   ngie $.$FreeBSD
 0590 3a207265 6c656e67 2f31312e 322f6c69  : releng/11.2/li
 05a0 622f6c69 62757469 6c2f6875 6d616e69  b/libutil/humani
 05b0 7a655f6e 756d6265 722e6320 33333137  ze_number.c 3317
 05c0 32322032 3031382d 30332d32 39203032  22 2018-03-29 02
 05d0 3a35303a 35375a20 6561646c 65722024  :50:57Z eadler $
 05e0 00244672 65654253 443a2072 656c656e  .$FreeBSD: relen
 05f0 672f3131 2e322f6c 69622f6c 69627574  g/11.2/lib/libut
 0600 696c2f68 65786475 6d702e63 20333331  il/hexdump.c 331
 0610 37323220 32303138 2d30332d 32392030  722 2018-03-29 0
 0620 323a3530 3a35375a 20656164 6c657220  2:50:57Z eadler 
 0630 24002446 72656542 53443a20 72656c65  $.$FreeBSD: rele
 0640 6e672f31 312e322f 6c69622f 6c696275  ng/11.2/lib/libu
 0650 74696c2f 67725f75 74696c2e 63203333  til/gr_util.c 33
 0660 31373232 20323031 382d3033 2d323920  1722 2018-03-29 
 0670 30323a35 303a3537 5a206561 646c6572  02:50:57Z eadler
 0680 20240024 46726565 4253443a 2072656c   $.$FreeBSD: rel
 0690 656e672f 31312e32 2f6c6962 2f6c6962  eng/11.2/lib/lib
 06a0 7574696c 2f667061 7273656c 6e2e6320  util/fparseln.c 
 06b0 33333137 32322032 3031382d 30332d32  331722 2018-03-2
 06c0 39203032 3a35303a 35375a20 6561646c  9 02:50:57Z eadl
 06d0 65722024 00244672 65654253 443a2072  er $.$FreeBSD: r
 06e0 656c656e 672f3131 2e322f6c 69622f6c  eleng/11.2/lib/l
 06f0 69627574 696c2f66 6c6f7065 6e2e6320  ibutil/flopen.c 
 0700 31393335 39312032 3030392d 30362d30  193591 2009-06-0
 0710 36203138 3a34373a 30335a20 64657320  6 18:47:03Z des 
 0720 24002446 72656542 53443a20 72656c65  $.$FreeBSD: rele
 0730 6e672f31 312e322f 6c69622f 6c696275  ng/11.2/lib/libu
 0740 74696c2f 65787061 6e645f6e 756d6265  til/expand_numbe
 0750 722e6320 33333137 32322032 3031382d  r.c 331722 2018-
 0760 30332d32 39203032 3a35303a 35375a20  03-29 02:50:57Z 
 0770 6561646c 65722024 00244672 65654253  eadler $.$FreeBS
 0780 443a2072 656c656e 672f3131 2e322f6c  D: releng/11.2/l
 0790 69622f6c 69627574 696c2f61 7574682e  ib/libutil/auth.
 07a0 63203333 31373232 20323031 382d3033  c 331722 2018-03
 07b0 2d323920 30323a35 303a3537 5a206561  -29 02:50:57Z ea
 07c0 646c6572 20240024 46726565 4253443a  dler $.$FreeBSD:
 07d0 2072656c 656e672f 31312e32 2f6c6962   releng/11.2/lib
 07e0 2f6c6962 7574696c 2f747269 6d646f6d  /libutil/trimdom
 07f0 61696e2e 63203333 31373232 20323031  ain.c 331722 201
 0800 382d3033 2d323920 30323a35 303a3537  8-03-29 02:50:57
 0810 5a206561 646c6572 20240024 46726565  Z eadler $.$Free
 0820 4253443a 2072656c 656e672f 31312e32  BSD: releng/11.2
 0830 2f6c6962 2f6c6962 7574696c 2f737475  /lib/libutil/stu
 0840 622e6320 33333137 32322032 3031382d  b.c 331722 2018-
 0850 30332d32 39203032 3a35303a 35375a20  03-29 02:50:57Z 
 0860 6561646c 65722024 00244672 65654253  eadler $.$FreeBS
 0870 443a2072 656c656e 672f3131 2e322f6c  D: releng/11.2/l
 0880 69622f6c 69627574 696c2f6c 6f67696e  ib/libutil/login
 0890 5f74696d 65732e63 20323532 33373620  _times.c 252376 
 08a0 32303133 2d30362d 32392031 353a3532  2013-06-29 15:52
 08b0 3a34385a 206b6965 6e747a6c 65202400  :48Z kientzle $.
 08c0 24467265 65425344 3a207265 6c656e67  $FreeBSD: releng
 08d0 2f31312e 322f6c69 622f6c69 62757469  /11.2/lib/libuti
 08e0 6c2f6c6f 67696e5f 6361702e 63203331  l/login_cap.c 31
 08f0 38313231 20323031 372d3035 2d303920  8121 2017-05-09 
 0900 32333a33 313a3039 5a207066 67202400  23:31:09Z pfg $.
 0910 24467265 65425344 3a207265 6c656e67  $FreeBSD: releng
 0920 2f31312e 322f6c69 622f6c69 62757469  /11.2/lib/libuti
 0930 6c2f5f73 65637572 655f7061 74682e63  l/_secure_path.c
 0940 20313339 30313220 32303034 2d31322d   139012 2004-12-
 0950 31382031 323a3331 3a31325a 20727520  18 12:31:12Z ru 
 0960 24002446 72656542 53443a20 72656c65  $.$FreeBSD: rele
 0970 6e672f31 312e322f 6c69622f 6373752f  ng/11.2/lib/csu/
 0980 69333836 2f637274 6e2e5320 32313731  i386/crtn.S 2171
 0990 30352032 3031312d 30312d30 37203136  05 2011-01-07 16
 09a0 3a30373a 35315a20 6b696220 2400      :07:51Z kib $
```
.


----------



## zirias@ (Jun 30, 2022)

gotdrip88 said:


> ```
> 0000 24467265 65425344 3a207265 6c656e67 $FreeBSD: releng
> 0010 2f31312e 322f6c69 622f6373 752f6933 /11.2/lib/csu/i3
> 0020 38362f63 7274692e 53203231 37313035 86/crti.S 217105
> ```


Intriguing!

Now the price question is: How did you get that into a "fresh" 13.1 installation? Did you perhaps manage to install "unclean" and unselect the lib32 component?


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> Intriguing!
> 
> Now the price question is: How did you get that into a "fresh" 13.1 installation? Did you perhaps manage to install "unclean" and unselect the lib32 component?


I don' t remember unselecting that. I did self partition the disk to dualboot


----------



## gotdrip88 (Jun 30, 2022)

gotdrip88 said:


> I don' t remember unselecting that. I did self partition the disk to dualboot





> /dev/ada0p2     /               ufs     rw      1       1
> /dev/ada0p1     /boot/efi               msdosfs rw      2       2
> /dev/ada0p6     /var            ufs     rw      2       2
> /dev/ada0p8     none            swap    sw      0       0


/etc/fstab file


----------



## zirias@ (Jun 30, 2022)

Your /usr/lib32/libutil.so.9 obviously is from 11.2-RELEASE, so, pretty ancient. Did you have 11.2-RELEASE installed there previously?


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> Your /usr/lib32/libutil.so.9 obviously is from 11.2-RELEASE, so, pretty ancient. Did you have 11.2-RELEASE installed there previously?


quite certain I didn't
I did have an old freebsd installation but I removed it' s partitions and it was this year so it couldn' t have been 11.2


----------



## zirias@ (Jun 30, 2022)

Whatever happened, it's b0rked. Reinstall 13.1 there, make sure lib32 is selected in the installer...


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> Whatever happened, it's b0rked. Reinstall 13.1 there, make sure lib32 is selected in the installer...


no way to not have to reinstall it all over again?


----------



## zirias@ (Jun 30, 2022)

You could try extracting lib32.txz (and, if applicable lib32-dbg.txz over your existing installation from https://download.freebsd.org/releases/amd64/amd64/13.1-RELEASE/ (assuming you're on amd64).

Not sure whether that would be a good idea...


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> You could try extracting lib32.txz (and, if applicable lib32-dbg.txz over your existing installation from https://download.freebsd.org/releases/amd64/amd64/13.1-RELEASE/ (assuming you're on amd64).
> 
> Not sure whether that would be a good idea...


That would probably fuck everything up
Thanks for helping


----------



## zirias@ (Jun 30, 2022)

gotdrip88 said:


> That would probably fuck everything up


Not necessarily. I'm a bit unsure about it, don't know whether e.g. file flags (chflags(1)) would be handled correctly. Maybe someone else could answer this...


----------



## SirDice (Jun 30, 2022)

I'd move your current /usr/lib32 out of the way (rename it to lib32.old or something like it). Then extract that lib32.txz from the 13.1 install media. 



gotdrip88 said:


> That would probably fuck everything up


Unlikely. These libraries are for 32 bit executables. Anything 'native' from FreeBSD would use the 64 bit libraries (/usr/lib), as would anything that's built for 64 bit. Wine is a special case.


----------



## gotdrip88 (Jun 30, 2022)

SirDice said:


> I'd move your current /usr/lib32 out of the way (rename it to lib32.old or something like it). Then extract that lib32.txz from the 13.1 install media.
> 
> 
> Unlikely. These are libraries for 32 bit executables. Anything 'native' from FreeBSD would use the 64 bit libraries, as would anything that's built for 64 bit.


shall try
hope it doesnt fuck it up then


----------



## gotdrip88 (Jun 30, 2022)

SirDice said:


> I'd move your current /usr/lib32 out of the way (rename it to lib32.old or something like it). Then extract that lib32.txz from the 13.1 install media.
> 
> 
> Unlikely. These libraries are for 32 bit executables. Anything 'native' from FreeBSD would use the 64 bit libraries (/usr/lib), as would anything that's built for 64 bit. Wine is a special case.


`$ winecfg
ld-elf32.so.1: Shared object "libthr.so.3" not found, required by "wine.bin"`

I done it moved new lib32 renamed old lib32.
wine still won' t work


----------



## zirias@ (Jun 30, 2022)

Does /usr/lib32/libthr.so.3 exist? Does /var/run/ld-elf32.so.hints exist (and contain `/usr/lib32`)?
You could try running `ldconfig -32` (if the lib is there).


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> Does /usr/lib32/libthr.so.3 exist? Does /var/run/ld-elf32.so.hints exist (and contain `/usr/lib32`)?
> You could try running `ldconfig -32` (if the lib is there).


the first one doesnt the second one does

`$ ls /usr/lib32/
etc    usr`


----------



## zirias@ (Jun 30, 2022)

gotdrip88 said:


> the first one doesnt the second one does
> 
> `$ ls /usr/lib32/
> etc    usr`


You extracted lib32.txz to /usr/lib32 instead of to /.
All FreeBSD distribution tarballs use paths relative to /.


----------



## SirDice (Jun 30, 2022)

Oh, you extracted the contents of lib32.txz in /usr/lib32. Extraction should be done from / (the archive contains the directory usr/lib32/).

`tar -C / -zxf lib32.txz` should do the right thing.


----------



## gotdrip88 (Jun 30, 2022)

Zirias said:


> You extracted lib32.txz to /usr/lib32 instead of to /.
> All FreeBSD distribution tarballs use paths relative to /.





SirDice said:


> Oh, you extracted the contents of lib32.txz in /usr/lib32. Extraction should be done from / (the archive contains the directory usr/lib32/).
> 
> `tar -C / -zxf lib32.txz` should do the right thing.


Thanks it started to work!


----------

