• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

vampyre can't load Tiff under Lazarus Mac OSX

Started by jus, 21 June 2011, 01:19:57

Previous topic - Next topic

jus

Hi,
   I'm using the latest vampyre trunk and Lazarus 0.9.31 (FPC 2.4.2) under Mac OSX 10.6 and I have just noticed that DetermineFileFormat,DetermineStreamFormat don't work for TIF files. The result string is empty. It works for JPG, but not for TIF.

Edit:
It seems that there is not only a with DetermineStreamFormat, but with loading tiff in Max OSX.

Kindly regards,
jus

Galfar

Hi, TIFF support in Imaging is provided by LibTiffDelphi library that uses precompiled
libtiff C library. Unfortunately, that's only available for Delphi.
There's test version of GCC compiled libtiff for Imaging in this thread that's usable in Lazarus.

jsj

I was made gcc compiling libtiff under win gcc (mingw32).
Tiff's are loaded.

But under Mac OS don't work.
"Linking error
Id: symbol(s) not found for architecture i386"

I try to use as mingw32 obj's as mac gcc obj's.
Don't work ;(

Any ideas?

jsj

Everything allright.
Tifflib under mac os is working! =)

jsj

Just use "-arch i386" parameter to compile tifflib object files

Galfar

Could you please check if TIFFs with JPEG compression are working with TiffLib compiled for MacOS?

jus

Quote from: jsj on  8 May 2012, 00:52:21
Just use "-arch i386" parameter to compile tifflib object files


Hi jsj,

  I'm very insterested in using Tifflib. The problem is that I'm not very familiar with compiling c++ files. Could you please provide some more detailed information how to build such a tifflib to use it in vampyre lib? And where/which version did you use to compile? I have tried to load the libtiff source code (http://www.libtiff.org) into xcode, but it didn't worked.  :(

jus

jsj

Galfar,
Tiff with jpeg codec dont supported by default (even under win32 lazarus, i cant tested it under delphi).
As I understand - tifflib must be compeled with -jpeglib parameters...

Jus, I recompiled the new imaginglib with tifflib 3.9.4
Under win32 - everything works, but under the macos - the same error again...
(ld: symbol(s) not found for architecture i386)
Maybe somebody know how to get more info from linker?
The worst thing - I seem to have forgotten the keys that I have compiled tifflib 3.9.1 (
And now again I try to resolve this problem...


PS: I can't register at this forum - get error

Galfar


jsj

Galfar, registration was successful =)

About tifflib under Mac - I forget compilation keys, but I have already compiled tifflib 3.9.1 under mac.
I will upload it... soon...

But with tifflib 3.9.4 under macos I have a problem..
I was build obj files for i386 architechture, but for success compilation need {$Linklib libtiff} and libtiff.a - x86-64 architechture somehow (i view it by otool)

Therefore I need correct compilation keys.
Now I compile tifflib as:

./configure CFLAGS="-arch i386"
make

But it not enough...

PS: sorry my english, but i think you understand me))

Galfar

jsj,
seems like the problem is not in GCC, or at least not in CPU architecture.

I did some experiments and the static lib (libtiff.a) produced by GCC is different
when you use "-arch i386" than with no flags. 64bit one is roughly 2x bigger in size
than 32bit one.

Also FPC gives this message:
ld: warning: ignoring file ./libtiff64.a, file was built for archive which is not the architecture being linked (i386)
when trying to link to x86_64 library.
This message is not displayed when linking library generated with "-arch i386".

Anyway, for both libraries linking always ends with:
Undefined symbols for architecture i386:
  "_TiffGetVersion", referenced from:

Maybe symbols are not properly exported or something :(

jsj

10 June 2012, 19:48:45 #11 Last Edit: 10 June 2012, 20:00:05 by jsj
I dont have any time to explore compiler flags, now.
I just copy here my compiled old version (3.9.1, but adaptated for 3.9.4 pas unit)

I hope that soon will deal with this.

PS: Some explanations for this version.
This code work as Windows as MacOsX.
There is two libtiff.a in pack.
libtiff.a - for mac os
libtiff-win.a - for windows (for compile - rename it to libtiff.a)

PPS: For compiling I use this link :
  http://www.kyngchaos.com/macosx/build/libtiff
  (some compiler flags are here)

Mauricio


Mauricio

Hi again,

i have tryied compiling from Delphi XE3 to macOSX with extensions.zip files above.

I have the following errors on LibTiffDelphi.pas :


line 3:
  {$Linklib libtiff}
Says: invalid compiler directive 'Linklib'


line 564: (last line)
Says: Bad object file format : 'D:\_DELPHI XE3\_COMPONENTS\Vampyre\Extras\Extensions\LibTiff\Compiled\macosx\jmemnobs.o'

Please, help me.
Mauricio

Galfar

I've been working on TIFF loader/saver for Imaging that won't need LibTiff as compiled objects
so in few weeks there will be TIFF support on more platforms (and LibTiff only as an option).

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk