PDA

View Full Version : issues with 4.2.2 opensource on OS X 1.4.8



wmmk
14th January 2007, 08:47
Hello all,
I'm trying to compile a qt app called qtpfsgui (HDR photography tonemapping software) on Mac OS X. The first step is to actually get Qt of course. Anyway, after cd-ing into the qt-mac-opensource-src-4.2.2 directory and entering ./compile, I got this:

http://forums.macrumors.com/showpost.php?p=3248255&postcount=29

sorry I didn't post all that here, but this board apparently has a 10000 character per post limit. anyway, how can I fix this?
thans,
wmmk

Moppel
14th January 2007, 13:38
sorry for asking but do you mean
./configure
and not ./compile?

Try ./configure -help to see the options available.
I run ./configure with the following options on my mac:
-prefix /opt/qt422/ -debug -fast -plugin-sql-sqlite

After this was done I run a "make" and a "make install" as root.
You can set a different prefix of course.

For creating apps I run a
"source setup"
in the terminal with setup a simple text file containing this:


export QTDIR=/opt/qt422
export PATH=/opt/qt422/bin:$PATH
export LIBPATH=/opt/qt422/lib:$LIBPATH


Can you do a "gcc -v" in the terminal and post the output?

HTH

wmmk
14th January 2007, 22:42
sorry for asking but do you mean
./configure
and not ./compile?
oops, that is certainly what I meant. I'm such a noob:o


Try ./configure -help to see the options available.
I run ./configure with the following options on my mac:
-prefix /opt/qt422/ -debug -fast -plugin-sql-sqlite

After this was done I run a "make" and a "make install" as root.
You can set a different prefix of course.

For creating apps I run a
"source setup"
in the terminal with setup a simple text file containing this:


export QTDIR=/opt/qt422
export PATH=/opt/qt422/bin:$PATH
export LIBPATH=/opt/qt422/lib:$LIBPATH


yikes, a lot of that is over my head! FWIW, the developer of the app told me this:

Hi,
I wanted to give it a try with the compiling process on mac:
first you need to download Qt4 from
www.trolltech.com/developer/downloads/qt/mac
then I found out that there's a darwin port of exiv2 as well, at:
exiv2.darwinports.com
the website right now doesn't seem to work, I found the google cache:
209.85.135.104/search?q=cache:yxwKEdb9SWAJ:exiv2.darwinports.com/+darwinports+exiv2&hl=en&ct=clnk&cd=1&client=firefox-a
As an alternative you can download the sources of exiv2 from:
www.exiv2.org/exiv2-0.12.tar.gz
untar it with:
tar xzf evix2-0.12.tar.gz
cd exiv2-0.12
./configure
make
make install
(last step as root)
Once you have Qt4 and exiv2 installed you can download the sources of qtpfsgui, type:
qmake
then with:
make
you compile the sources; at the end of the process you can run it with
./qtpfsgui
that should be it. I'd like to stress the "should" part because OS X could have its quirks that I don't know about.
Let me know,
Giuseppe
does that have anything to do with how to configure

Can you do a "gcc -v" in the terminal and post the output?

HTH

sure, I get this:

Last login: Sun Jan 14 14:43:53 on console
Welcome to Darwin!
will-kamins-computer:~ williekamin$ gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5250.obj~20/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --build=powerpc-apple-darwin8 --with-arch=pentium-m --with-tune=prescott --program-prefix= --host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)
will-kamins-computer:~ williekamin$

Moppel
15th January 2007, 17:55
mmh, the gcc output looks alright.
I have no idea why the ./configure script fails on your machine. May try to reinstall the xcode development stuff and maybe even redownload the qt library.

In the meantime I tried to compile the application. I needed to compile the libraries mentioned in the readme file.
That worked alright following their readme files. I than had to modify the project.pro file to point to the resulting libraries which I put in my home directory. (I couldn't find them for fink).
I noticed a workaround for the missing fopen_memstream (?) - which is also missing on OSX - for windows. I tried to extend all the
#ifdef _WIN32 with
#if defined Q_OS_MACX
but in the end I must have missed something and the linker complained about a few unresolved symbols. But I didn't try to find out where it went wrong.
Maybe the better approach would be to write a fake fopen_memstream. Well, not a fake but a working one...
If I had succeeded I still would have had to fiddle around with the paths as described here:
http://doc.trolltech.com/4.2/deployment-mac.html
(Including the qt dylibs and the other open... libraries to the package).

Right, that's all I have time for at the moment. But I don't think there is anything which can't be solved.