Re: Installation of pfstmo on OSX (10.8)

116 views
Skip to first unread message

Rafal

unread,
Oct 22, 2012, 10:18:30 AM10/22/12
to pfst...@googlegroups.com
Hi,

On Sunday, 21 October 2012 05:06:44 UTC+1, toejough wrote:
Has anyone tried this yet?

I am trying to do so, and running into many issues. Several of the libraries that the README.OSX file for pfstools says to install are not found by fink, and I've had trouble tracking them down (such as libtool14 and automake1.9).

It is not necessary to install exactly the same version. Any version of automake and libtool will work. 
 
I've muddled through, and now I'm stuck at the install of pfstmo. If I run ./configure CXXFLAGS=-m32, I get the following:
Making all in mantiuk06
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -O3 -m32 -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro   -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o  -L/usr/local/lib -lpfs-1.2
libtool: link: g++ -O3 -m32 -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o -Wl,-bind_at_load  -L/usr/local/lib /usr/local/lib/libpfs-1.2.dylib
Undefined symbols for architecture i386:
  "___builtin_expect", referenced from:
      __Z21tmo_mantiuk06_contmapiiPfS_S_S_ffbifPFiiE.omp_fn.0 in contrast_domain.o
ld: symbol(s) not found for architecture i386


It seem that some of the files are already compiled for 64-bit. Try running "make clean" and then "make" again.
 
if I leave that flag off, I get this:
Undefined symbols for architecture x86_64:
  "pfs::DOMIO::writeFrame(pfs::Frame*, __sFILE*)", referenced from:
      tmo_drago03(int, char**)in pfstmo_drago03.o
  "pfs::DOMIO::freeFrame(pfs::Frame*)", referenced from:
      tmo_drago03(int, char**)in pfstmo_drago03.o

pfstools and pfstmo must be compiled using exactly the same architecture; you need to either provide of skip CXXFLAGS=-m32 for both pfstools and pfstmo.

Rafal

Message has been deleted

toejough

unread,
Oct 22, 2012, 5:44:46 PM10/22/12
to pfst...@googlegroups.com
Ok, did that. I've tried cleaning and rebuilding everything in both 32 and 64 bit modes. The shortest error I've managed to get is with 64-bit everything, and again it's in contrast_domain.o for the mantiuk06 tone-mapper:
Making all in mantiuk06
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -O3    -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro   -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o  -L/usr/local/lib -lpfs-1.2
libtool: link: g++ -O3 -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o -Wl,-bind_at_load  -L/usr/local/lib /usr/local/lib/libpfs-1.2.dylib
Undefined symbols for architecture x86_64:

  "___builtin_expect", referenced from:
      __Z21tmo_mantiuk06_contmapiiPfS_S_S_ffbifPFiiE.omp_fn.0 in contrast_domain.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [pfstmo_mantiuk06] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I also don't seem to have dcraw2hdrgen installed, which is part of the workflow I'm trying to use (got it from http://photoblog.edu-perez.com/2009/02/hdr-and-linux.html
). It's in the man pages for pfstools (http://pfstools.sourceforge.net/man1/dcraw2hdrgen.1.html) - is that supposed to be installed, or do I need to do something else?

If anyone has gotten an hdr flow working with pfstools on mac osx 10.8, I'd love to hear what you're doing and how you got everything installed.

Thanks,

-joe

toejough

unread,
Oct 23, 2012, 8:49:50 PM10/23/12
to pfst...@googlegroups.com

I also don't seem to have dcraw2hdrgen installed, which is part of the workflow I'm trying to use (got it from http://photoblog.edu-perez.com/2009/02/hdr-and-linux.html
). It's in the man pages for pfstools (http://pfstools.sourceforge.net/man1/dcraw2hdrgen.1.html) - is that supposed to be installed, or do I need to do something else?

I found the dcraw2hdrgen in the pfscalibration tools, and it installed just fine. That leaves the Mantiuk06 tmo that didn't get installed correctly, but given everything else works, that's not a huge deal.

Thanks,

-joe

Rafal

unread,
Oct 26, 2012, 6:46:05 AM10/26/12
to pfst...@googlegroups.com
On Monday, 22 October 2012 22:44:46 UTC+1, toejough wrote:
Ok, did that. I've tried cleaning and rebuilding everything in both 32 and 64 bit modes. The shortest error I've managed to get is with 64-bit everything, and again it's in contrast_domain.o for the mantiuk06 tone-mapper:
Making all in mantiuk06
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -O3    -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro   -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o  -L/usr/local/lib -lpfs-1.2
libtool: link: g++ -O3 -fopenmp -ffast-math -ftree-vectorize -mfpmath=sse,387 -DBRANCH_PREDICTION -mpentiumpro -o pfstmo_mantiuk06 pfstmo_mantiuk06.o contrast_domain.o -Wl,-bind_at_load  -L/usr/local/lib /usr/local/lib/libpfs-1.2.dylib
Undefined symbols for architecture x86_64:
  "___builtin_expect", referenced from:

 
This looks like a problem with branch prediction. You can disable it by adding 

#undef BRANCH_PREDICTION

in ./config.h, somewhere before the line 

#ifdef BRANCH_PREDICTION

Cheers,

Rafal



toejough

unread,
Jan 13, 2013, 6:42:27 PM1/13/13
to pfstools
Hi Sira,

Rafal's suggestion worked just fine for me (a much-belated thanks,
Rafal!).

I got everything working by:
make clean
./configure CXXFLAGS=-m64
adding Rafal's suggested undef statement right before the ifdef in
config.h
make
sudo make install

I'm running OSX 10.8.2

-joe

On Jan 13, 1:51 pm, Sira Ferradans <sira.ferrad...@gmail.com> wrote:
> Hello,
> I have tried this and it is not working for me, I still get exactly the
> same error, did anybody manage to compile mantiuk 06 in Mac os?
> Thank you for your help,
> Sira.
Reply all
Reply to author
Forward
0 new messages