# Questions about 32/64 bit packages



## ljimber (Mar 23, 2012)

Hi group,

We have started moving some of our boxes to am64 platforms recently. I have come across a wget issue on my amd64 boxes.

The box is 8.2-RELEASE amd64.


```
[/home/lee] --# wget
/libexec/ld-elf.so.1: /usr/lib/libiconv.so.3: unsupported file layout
```


```
[/home/lee] --# ldd /usr/local/bin/wget 
/usr/local/bin/wget:
	libssl.so.6 => /usr/lib/libssl.so.6 (0x800691000)
	libcrypto.so.6 => /lib/libcrypto.so.6 (0x8007e4000)
	libiconv.so.3 => not found (0x0)
	libintl.so.9 => not found (0x0)
	libc.so.7 => /lib/libc.so.7 (0x800a84000)
```


```
[/home/lee] --# ldconfig -r | grep libiconv.so.3
	37:-liconv.3 => /lib/libiconv.so.3
	106:-liconv.3 => /usr/lib/libiconv.so.3
	108:-liconv.3 => /usr/local/lib/libiconv.so.3
```

I tried copying libinconv.so.3 to /lib/, /usr/lib, and still the same error.

Couple questions:

1. Since this box was a convert from i386 and we have a master script that runs around sets up the box and installs packages. How do I tell if the package that is currently installed is a 32bit or 64 bit package? 

2. I grabbed the wget-1.12_2 from freebsd.org amd64 8.2-REL packages dir and get the same error. 

Any ideas?

Thanks,

Lee


----------



## Beeblebrox (Mar 23, 2012)

> The box is 8.2-RELEASE amd64
> 
> How do I tell if the package that is currently installed is a 32bit or 64 bit


Normally, the above dictates that nearly all packages are 64bit.
However, what the hell does this mean??


> this box was a convert from i386 and we have a master script that runs around sets up the box and installs packages


----------



## ljimber (Mar 26, 2012)

"Normally, the above dictates that nearly all packages are 64b.
However, what the hell does this mean??"

Our old boxes were 32bit machines and we recently started deploying our application servers on 64bit hardware. We have a master script that once the OS is installed the script is run which runs around, installs packages, our own software and sets all the things we need to be set automatically. The reason I ask about 64/32bit packages is this script is still using 32bit packages during the install. I had to set LD_LIBRARY_32_PATH to get these to work on the new amd64 OS. That all works mostly but wget. So I uninstalled the default 32bit wget package, grabbed the latest 64bit package from freebsd.org and tried to install that, but get the same error. 

Cheers,

Lee


----------



## SirDice (Mar 26, 2012)

Don't mix and match 32 and 64 bit packages. Install _only_ 64 bit packages on a machine running FreeBSD-amd64.


----------



## Chris_H (Mar 26, 2012)

Greetings,
 Generally speaking, with modern/recent CPU's, and reasonably recent FreeBSD versions, the following has little, if any effect. That said, if you're working in a "mixed" environment, or changing *$arch*, this can have a positive effect. make(1) allows for setting global options via /etc/make.conf(). In your case, I might recommend defining
[cmd=""]CPUTYPE?=[/cmd]
As I don't know exactly which CPU you're using, I'll leave it as an exercise to you, as to which of those listed in [cmd=""]/usr/share/examples/etc/make.conf[/cmd]
is best suited for your CPU.
*PLEASE NOTE*
This should not be attempted prior to
[cmd=""]make buildworld[/cmd]
or
[cmd=""]make buildkernel[/cmd]
Additional research is recommended.


----------



## Chris_H (Mar 26, 2012)

Greetings,
[cmd=""]/usr/src/share/mk/bsd.cpu.mk[/cmd]
and
sysctl(8)
[cmd=""]sysctl hw.model[/cmd]
should also shed further light on this subject.


----------

