# libjpeg.so.10 not found



## Erratus (Feb 24, 2010)

Having done 
	
	



```
# portmaster -r jpeg-8
```
 before, I cannot fix this error while installing 


```
# portmaster qt-copy
```


```
c++ -fno-exceptions  -Wl,-rpath,/usr/local/lib  -Wl,-rpath,/usr/local/lib -pthread -o ../../../bin/uic .obj/release-shared-mt/main.o  
.obj/release-shared-mt/uic.o  .obj/release-shared-mt/form.o  .obj/release-shared-mt/object.o  .obj/release-shared-mt/subclassing.o  
.obj/release-shared-mt/embed.o  .obj/release-shared-mt/widgetdatabase.o  .obj/release-shared-mt/domtool.o  .obj/release-shared-mt/parser.o    
-L/usr/local/lib -L/usr/local/lib -L/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/lib -L/usr/local/lib -lqt-mt -lmng -ljpeg -lpng -lz 
-lXi -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM 
-lICE                                                                                                                                       
/usr/bin/ld: warning: libjpeg.so.10, needed by /usr/local/lib/libqt-mt.so, not found ([color="DarkRed"]try using -rpath or -rpath-
link[/color])                                       
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_start_decompress@LIBJPEG_7.0'                                                                       
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_resync_to_restart@LIBJPEG_7.0'                                                                      
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_read_scanlines@LIBJPEG_7.0'                                                                         
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_start_compress@LIBJPEG_7.0'                                                                         
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_finish_compress@LIBJPEG_7.0'                                                                        
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_finish_decompress@LIBJPEG_7.0'                                                                      
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_CreateCompress@LIBJPEG_7.0'                                                                         
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_set_defaults@LIBJPEG_7.0'                                                                           
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_read_header@LIBJPEG_7.0'                                                                            
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_CreateDecompress@LIBJPEG_7.0'                                                                       
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_std_error@LIBJPEG_7.0'                                                                              
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_destroy_compress@LIBJPEG_7.0'                                                                       
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_destroy_decompress@LIBJPEG_7.0'                                                                     
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_write_scanlines@LIBJPEG_7.0'                                                                        
/usr/local/lib/libqt-mt.so: undefined reference to `jpeg_set_quality@LIBJPEG_7.0'                                                                            
*** Error code 1                                                                                                                                             

Stop in /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/tools/designer/uic.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/tools/designer/uic.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/tools/designer.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/tools.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.

===>>> make failed for x11-toolkits/qt33
===>>> Aborting update
```


```
# locate libjpeg.so
/usr/local/lib/libjpeg.so
/usr/local/lib/libjpeg.so.10
```

I cannot do try using -rpath or -rpath-link as I don't know how and where to do this.

Please help me out of this.


----------



## DutchDaemon (Feb 24, 2010)

Don't trust locate, because it gets updated only once a week. See what [cmd=]ls -al /usr/local/lib/libjpeg.so*[/cmd] turns up. You should have so.11 by now, not so.10. And see what [cmd=]ldconfig -r | grep jpeg[/cmd] turns up.


----------



## Erratus (Feb 24, 2010)

Thanks for quick reply, DutchDaemon. Here we go:

```
# ls -al /usr/local/lib/libjpeg.so*
lrwxr-xr-x  1 root  wheel      13  8 Feb 01:46 /usr/local/lib/libjpeg.so -> libjpeg.so.11
-rwxr-xr-x  1 root  wheel  244471  8 Feb 01:46 /usr/local/lib/libjpeg.so.11
```


```
#  ldconfig -r | grep jpeg
        413:-ljpeg.11 => /usr/local/lib/libjpeg.so.11
        650:-lopenjpeg.2 => /usr/local/lib/libopenjpeg.so.2
```


----------



## DutchDaemon (Feb 24, 2010)

When you did [cmd=]portmaster -r jpeg-8[/cmd], x11-toolkits/qt33 should already have been rebuilt, because it is dependent on graphics/jpeg (build and run dependency).

BTW, the command [cmd=]portmaster qt-copy[/cmd] should fail, as there is no port of that name.


----------



## Erratus (Feb 24, 2010)

Here 





> portmaster qt-copy


 does this:

```
:/usr/ports # portmaster qt-copy                     

===>>> Currently installed version: qt-copy-3.3.8_10
===>>> Port directory: /usr/ports/x11-toolkits/qt33 

===>>> Gathering distinfo list for installed ports

===>>> Gathering dependency list for x11-toolkits/qt33 from ports
===>>> Starting recursive 'make config' check                    
===>>> Recursive 'make config' check complete for x11-toolkits/qt33

===>>> Starting build for x11-toolkits/qt33 <<<===

===>>> All dependencies are up to date

===>  Cleaning for qt-copy-3.3.8_11

===>  Found saved configuration for qt-3.3.8_10
===>  Extracting for qt-copy-3.3.8_11          
=> MD5 Checksum OK for KDE/qt-x11-free-3.3.8.tar.bz2.
=> SHA256 Checksum OK for KDE/qt-x11-free-3.3.8.tar.bz2.
===>  Patching for qt-copy-3.3.8_11
```

I do not remember for sure, as jpeg8 was some days ago, but it may be a leftover. 

What i remember for sure is that since then these ports failed building: 
arts-1.5.10_2,1                     <   needs updating (port has 1.5.10_3,1)
kdelibs-3.5.10_3                    <   needs updating (port has 3.5.10_4)
kmysqladmin-0.7.2_4                 <   needs updating (port has 0.7.2_5)
qt-copy-3.3.8_10                    <   needs updating (port has 3.3.8_11)

Any idea what to do now?


----------



## DutchDaemon (Feb 24, 2010)

All I can point to is /usr/ports/UPDATING:


```
20100205:
  AFFECTS: users of Qt 3 and KDE 3
  AUTHOR: itetcu@FreeBSD.org

  When building qt33 and kdelibs3 (at least), while they are installed,
  because of -L/usr/local/lib being passed too soon, the currently installed
  libraries are used instead of the ones from the build.  This makes the
  build fail if you updated any of the libraries these Qt/KDE libraries are
  linked against (e.g. libjpeg).

  For the moment the workaround, when you get to this, is to move the old lib
  out of the way, e.g.:

    mv /usr/local/lib/libqt-mt.so /usr/local/lib/libqt-mt.so.old && \
    cd /usr/ports/x11-toolkits/qt33/ && make && \
    mv /usr/local/lib/libqt-mt.so.old /usr/local/lib/libqt-mt.so && \
    portmaster -C x11-toolkits/qt33 (or portupgrade -w qt-33\*) ...
```


----------



## Erratus (Feb 24, 2010)

After 
	
	



```
mv /usr/local/lib/libqt-mt.so /usr/local/lib/libqt-mt.so.old
```
 I could compile arts-1.5.10_3,1 and /usr/ports/x11-toolkits/qt33

but kdelibs failed like this:

```
gmake[2]: Entering directory `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10/dnssd'
../kdecore/kconfig_compiler/kconfig_compiler ./kcm_kdnssd.kcfg ./settings.kcfgc; ret=$?; \
        if test "$ret" != 0; then rm -f settings.h ; exit $ret ;  fi
/libexec/ld-elf.so.1: Shared object "libjpeg.so.10" not found, required by "libkdefx.so.6"
gmake[2]: *** [settings.h] Fehler 1
gmake[2]: Leaving directory `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10/dnssd'
gmake[1]: *** [all-recursive] Fehler 1
gmake[1]: Leaving directory `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10'
gmake: *** [all] Fehler 2
*** Error code 1

Stop in /usr/ports/x11/kdelibs3.

===>>> make failed for x11/kdelibs3
===>>> Aborting update
```

As I decided to delete kmysqladmin recursively there is no more need for kdelibs3. This saved my day.

What I have learned: Reading /usr/ports/UPDATING is good for the ego when having problems building ports.


----------

