WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Imlib compile error  (Read 6185 times)

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Imlib compile error
« on: June 09, 2010, 06:10:36 PM »
Hi

I am trying to compile a program that uses Imlib
I got following Imlib-related errors:
Code: [Select]
tc@box:/mnt/hda1/Compile/XtDesktop/xtdesktop-0.7b$ make > Errors
/usr/local/lib/libImlib.a(load.o): In function `ispng':
load.c:(.text+0x848): undefined reference to `png_check_sig'
/usr/local/lib/libImlib.a(load.o): In function `_LoadGIF':
load.c:(.text+0x303a): undefined reference to `DGifOpenFileHandle'
load.c:(.text+0x3075): undefined reference to `DGifGetRecordType'
load.c:(.text+0x30a1): undefined reference to `PrintGifError'
load.c:(.text+0x3159): undefined reference to `DGifCloseFile'
load.c:(.text+0x31b8): undefined reference to `DGifGetImageDesc'
load.c:(.text+0x327e): undefined reference to `DGifCloseFile'
load.c:(.text+0x32e4): undefined reference to `DGifGetExtension'
load.c:(.text+0x3309): undefined reference to `DGifGetExtensionNext'
load.c:(.text+0x33f4): undefined reference to `PrintGifError'
load.c:(.text+0x343d): undefined reference to `DGifGetLine'
load.c:(.text+0x348f): undefined reference to `DGifGetLine'
load.c:(.text+0x34b5): undefined reference to `DGifCloseFile'
load.c:(.text+0x34cc): undefined reference to `DGifCloseFile'
/usr/local/lib/libImlib.a(load.o): In function `_LoadTIFF':
load.c:(.text+0x3547): undefined reference to `TIFFFdOpen'
load.c:(.text+0x3568): undefined reference to `TIFFGetField'
load.c:(.text+0x3582): undefined reference to `TIFFGetField'     
load.c:(.text+0x35af): undefined reference to `TIFFClose'       
load.c:(.text+0x35c9): undefined reference to `_TIFFmalloc'     
load.c:(.text+0x35fc): undefined reference to `TIFFReadRGBAImage'
load.c:(.text+0x36fb): undefined reference to `_TIFFfree'
load.c:(.text+0x3706): undefined reference to `TIFFClose'
load.c:(.text+0x3732): undefined reference to `_TIFFfree'             
load.c:(.text+0x373d): undefined reference to `TIFFClose'             
/usr/local/lib/libImlib.a(load.o): In function `_LoadPNG':           
load.c:(.text+0x3779): undefined reference to `png_create_read_struct'
load.c:(.text+0x3793): undefined reference to `png_create_info_struct'
load.c:(.text+0x37d0): undefined reference to `png_init_io'   
load.c:(.text+0x37e2): undefined reference to `png_read_info'   
load.c:(.text+0x3827): undefined reference to `png_get_IHDR'   
load.c:(.text+0x384e): undefined reference to `png_set_expand' 
load.c:(.text+0x3859): undefined reference to `png_set_strip_16'
load.c:(.text+0x3864): undefined reference to `png_set_packing'       
load.c:(.text+0x387e): undefined reference to `png_get_valid'         
load.c:(.text+0x38a1): undefined reference to `png_set_filler'         
load.c:(.text+0x3966): undefined reference to `png_destroy_read_struct'
load.c:(.text+0x398a): undefined reference to `png_read_image'         
load.c:(.text+0x39a4): undefined reference to `png_destroy_read_struct'
load.c:(.text+0x3a73): undefined reference to `png_set_expand'         
load.c:(.text+0x3be5): undefined reference to `png_destroy_read_struct'
/usr/local/lib/libImlib.a(load.o): In function `_LoadJPEG':           
load.c:(.text+0x3c26): undefined reference to `jpeg_std_error'       
load.c:(.text+0x3c72): undefined reference to `jpeg_CreateDecompress'
load.c:(.text+0x3c87): undefined reference to `jpeg_stdio_src'       
load.c:(.text+0x3c9d): undefined reference to `jpeg_read_header'       
load.c:(.text+0x3cbf): undefined reference to `jpeg_start_decompress' 
load.c:(.text+0x3d25): undefined reference to `jpeg_finish_decompress'
load.c:(.text+0x3d2d): undefined reference to `jpeg_destroy_decompress'
load.c:(.text+0x3d9a): undefined reference to `jpeg_read_scanlines'   
load.c:(.text+0x3e0d): undefined reference to `jpeg_destroy_decompress'
load.c:(.text+0x3e52): undefined reference to `jpeg_read_scanlines'         
/usr/local/lib/libImlib.a(utils.o): In function `_png_io_read':             
utils.c:(.text+0x8fc): undefined reference to `png_get_io_ptr'               
/usr/local/lib/libImlib.a(utils.o): In function `Imlib_inlined_png_to_image':
utils.c:(.text+0x3c27): undefined reference to `png_create_read_struct'
utils.c:(.text+0x3c3a): undefined reference to `png_create_info_struct'
utils.c:(.text+0x3c90): undefined reference to `png_set_read_fn'
utils.c:(.text+0x3ca2): undefined reference to `png_read_info'   
utils.c:(.text+0x3ce7): undefined reference to `png_get_IHDR'   
utils.c:(.text+0x3d0d): undefined reference to `png_set_strip_16'
utils.c:(.text+0x3d18): undefined reference to `png_set_packing'       
utils.c:(.text+0x3d32): undefined reference to `png_get_valid'         
utils.c:(.text+0x3d55): undefined reference to `png_set_filler'         
utils.c:(.text+0x3e43): undefined reference to `png_destroy_read_struct'
utils.c:(.text+0x3e5d): undefined reference to `png_read_image'         
utils.c:(.text+0x3e77): undefined reference to `png_destroy_read_struct'
utils.c:(.text+0x4089): undefined reference to `png_set_expand'         
utils.c:(.text+0x409c): undefined reference to `png_set_expand'         
utils.c:(.text+0x40e9): undefined reference to `png_destroy_read_struct'
utils.c:(.text+0x4113): undefined reference to `png_destroy_read_struct'

Does nyone know what is going wrong??
Or how to fix it??

//Batnas

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Imlib compile error
« Reply #1 on: June 09, 2010, 06:53:10 PM »
What extensions do you have loaded?

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Imlib compile error
« Reply #2 on: June 10, 2010, 06:03:32 AM »
Here they are:

kmaps.tcz
opera.tcz
compiletc.tcz
Xorg-7.5-dev.tcz
imlib-dev.tcz

//Batnas

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Imlib compile error
« Reply #3 on: June 10, 2010, 06:13:49 AM »
Is base-dev loaded? Are you using 2.x or 3.x?

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Imlib compile error
« Reply #4 on: June 10, 2010, 06:19:20 AM »
base-dev.tcz is loaded, as it is and dependency of compiletc.tcz
I have checked with a few files from base-dev.tcz, and the files are there.

I am using TC3 alpha 06

\\Batnas

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Imlib compile error
« Reply #5 on: June 10, 2010, 06:23:40 AM »
Is it possible that the imlib dev files in base-dev are clashing with the files in imlib-dev?

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Imlib compile error
« Reply #6 on: June 10, 2010, 06:37:30 AM »
Is it possible that the imlib dev files in base-dev are clashing with the files in imlib-dev?
Im not sure what you mean by that?
Are there imlib-files in base-dev??

When i reboot without loading imlib-dev.tcz, I got following error:
Code: [Select]
make
/usr/local/bin/ld: cannot find -lImlib
collect2: ld returned 1 exit status
make: Error 1

To me it does not seem to be the way to go...

//Batnas

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Imlib compile error
« Reply #7 on: June 10, 2010, 07:13:09 AM »
You don't have the lib itself loaded (imlib.tcz), it's not a dep of -dev.
The only barriers that can stop you are the ones you create yourself.

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Imlib compile error
« Reply #8 on: June 10, 2010, 07:59:03 AM »
I fixed it!

I changed
Code: [Select]
LIBS     = -L/usr/X11R6/lib -lImlib -lXaw -ldlto
Code: [Select]
LIBS     = -L/usr/X11R6/lib -lImlib -lXaw -ldl -lXext -lpng -lz -ltiff -lgif
And it is now compiled

\\Batnas

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Imlib compile error
« Reply #9 on: June 10, 2010, 08:16:24 AM »
Are there imlib-files in base-dev??

Sorry - I was confused with imlib2... (the files of which seem to be missing from base-dev.tcz.list)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Imlib compile error
« Reply #10 on: June 10, 2010, 08:35:21 AM »
You linked it against the static lib in imlib-dev, not the shared one of imlib.tcz. Please relink with the shared one if you're going to submit it to the repo.
The only barriers that can stop you are the ones you create yourself.

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Imlib compile error
« Reply #11 on: June 10, 2010, 08:58:45 AM »
It works almost out-of-the-box if I install imlib.tcz too.

However it will take a while before i will submit, as the program gives me a segmentation fault.  :'(


//batnas