# cups error while loading shared libraries: /usr/lib/libcups.so.2: ELF file OS ABI inv



## da1 (Aug 28, 2010)

Hello fellas,

I have a 8.0-RELEASE (i386) with the following make.conf:

```
PERL_VERSION=5.8.9
WRKDIRPREFIX=/wrkdir
NO_BIND = YES
WITH_CUPS=YES
CUPS_OVERWRITE_BASE=YES
WITHOUT_LPR=YES
```
  and a custom kernel that has all the features of GENERIC + all required stuff for pf. Nothig special up to this point.

I needed to install cups on this particular machine because the network it resides on has several printers. There is 1 network printer which I added without any problems but I also need to add a Samsung CLP-310_Series USB printer.

I have:
	
	



```
cups-base-1.4.4
cups-client-1.4.4
cups-image-1.4.4
cups-pstoraster-8.15.4_6
gutenprint-cups-5.2.4_2
gutenprint-base-5.2.4_2
gutenprint-cups-5.2.4_2
```

and devfs.rules:

```
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/4.2.0' mode 0660 group cups                        [B][color="Red"]<- this was added because cups did not see/detect my usb printer[/color][/B]
```

and after a restart of devfs and cups, I was able to add the Samsung printer (ppd was on the CD). All fine and dandy up to this point but when I tried to print a test page I got:

```
D [28/Aug/2010:11:44:14 +0300] [Job 29] Restarted by "da1".
D [28/Aug/2010:11:44:14 +0300] [Job 29] [B][color="#ff0000"]Samsung_CLP-310_Series: error while loading shared libraries: /usr/lib/libcups.so.2: ELF file OS ABI invalid[/color][/B]
D [28/Aug/2010:11:44:14 +0300] [Job 29] print_device
D [28/Aug/2010:11:44:14 +0300] [Job 29] usb_find_busses=0
D [28/Aug/2010:11:44:14 +0300] [Job 29] usb_find_devices=0
D [28/Aug/2010:11:44:14 +0300] [Job 29] STATE: +connecting-to-device
D [28/Aug/2010:11:44:14 +0300] [Job 29] STATE: -connecting-to-device
D [28/Aug/2010:11:44:14 +0300] [Job 29] load_banner(filename="/var/spool/cups/d00029-001")
D [28/Aug/2010:11:44:14 +0300] [Job 29] Page = 595x842; 12,12 to 582,830
D [28/Aug/2010:11:44:14 +0300] [Job 29] Page = 595x842; 12,12 to 582,830
D [28/Aug/2010:11:44:14 +0300] [Job 29] slow_collate=0, slow_duplex=0, slow_order=0
D [28/Aug/2010:11:44:14 +0300] [Job 29] Before copy_comments - %!PS-Adobe-3.0
D [28/Aug/2010:11:44:14 +0300] [Job 29] %!PS-Adobe-3.0
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%BoundingBox: 12 12 582 830
D [28/Aug/2010:11:44:14 +0300] [Job 29] %cupsRotation: 0
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%Creator: bannertops/CUPS v1.4.4
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%CreationDate: Sat Aug 28 11:44:14 2010
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%LanguageLevel: 2
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%DocumentData: Clean7Bit
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%Title: (Test Page)
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%For: (da1)
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%Pages: 1
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%DocumentSuppliedResources: font Monospace
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%+ font Monospace-Bold
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%+ font Monospace-BoldOblique
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%+ font Monospace-Oblique
D [28/Aug/2010:11:44:14 +0300] [Job 29] %%EndComments
D [28/Aug/2010:11:44:14 +0300] [Job 29] Before copy_prolog - %%BeginProlog
D [28/Aug/2010:11:44:14 +0300] [Job 29] End of messages
D [28/Aug/2010:11:44:14 +0300] [Job 29] printer-state=3(idle)
D [28/Aug/2010:11:44:14 +0300] [Job 29] [B][color="#ff0000"]printer-state-message="/usr/local/libexec/cups/filter/rastertosamsungsplc failed[/color][/B]"
D [28/Aug/2010:11:44:14 +0300] [Job 29] printer-state-reasons=none
```

/usr/lib/libcups.so.2 -> 
	
	



```
-r-xr-xr-x  1 root  wheel  297450 Aug 27 21:50 /usr/lib/libcups.so.2
```

and /usr/local/libexec/cups/filter/rastertosamsungsplc

```
-r-xr-xr-x  1 root  wheel  106656 Aug 28 11:43 /usr/local/libexec/cups/filter/rastertosamsungsplc
```

"rastertosamsungsplc" did not exist and I copied it from the CD (maybe the file had problems ?)

So I have 2 problems.
1)/usr/lib/libcups.so.2
2)rastertosamsungsplc

As far as problem 2 goes, I am guessing the file has some problems (although it worked on a centos with the same printer - wtf ? )

For problem 1, I am left guessing. That file belongs to cups. If it were damaged in any way, I should see errors when I use the other printer too (maybe).


Any thoughts are welcomed.





LE:
	
	



```
# ldd /usr/lib/libcups.so.2
/usr/lib/libcups.so.2:
        libm.so.5 => /lib/libm.so.5 (0x28300000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x2831a000)
        libz.so.5 => /lib/libz.so.5 (0x281ee000)
        libthr.so.3 => /lib/libthr.so.3 (0x28333000)
        libc.so.7 => /lib/libc.so.7 (0x28091000)
```
I have the linux kernel module loaded and "linux_base-f10-10_2" installed
My guess is that cups needs a linux version of "libcups.so.2" and not a native BSD one. This would explain the fact that it cannot find the file in the first place.
I searched for "libcups.so.2" and the only place I could find it was in "/usr/lib" which means that this file is a BSD file.
I will try to find out where does cups look for "libcups.so.2".


LE2:
If I try to manually start "rastertosamsungsplc", I get 
	
	



```
./rastertosamsungsplc: error while loading shared libraries: /usr/lib/libcups.so.2: ELF file OS ABI invalid
```
 so it is clearly a problem with the lib. At this point I cannot even assume that "rastertosamsungsplc" is corrupted in any way. nice .....


----------



## EdGe (Aug 28, 2010)

Greetings.

I can't contribute to a solution of the cups errors you have.
Maybe you should try a approach with print/ghostscript7, print/foomatic-filters and foo2gpdl besides cups to configure the printer. In the INSTALL file look for "FREEBSD NOTES".

EdGe


----------



## da1 (Aug 28, 2010)

EdGe ... I owe you 2 million beers lol.

Apparently, using the driver from foo2gpdl, makes cups work and all errors > /dev/null 

Happy like a kid. 

Thanks EdGe.


PS: The errors that cups showed me, pointed to a totally different direction. wtf is wrong with cups ?


----------

