hugin 2010 build issue "in /opt/local/lib/libsqlite3.dylib, file is not of required architecture"

91 views
Skip to first unread message

sansloesa

unread,
Sep 4, 2010, 4:47:54 PM9/4/10
to hugin and other free panoramic software
Very fine Greetings,

I am trying to build hugin 2010 on MacBook Pro 10.6.4 , I followed
all
the instructions on the wiki and compiled and installed all the
prerequisites for hugin. Everything worked fine, but then I am running
into the following error:


....
Linking CXX shared library libhuginbase.dylib
ld: warning: duplicate dylib /opt/local/lib/libboost_thread-mt.dylib
ld: warning: duplicate dylib /opt/local/lib/libboost_date_time-
mt.dylib
[ 33%] Built target huginbase

Scanning dependencies of target huginbasewx
[ 33%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/ImageCache.cpp.o
[ 34%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/MyProgressDialog.cpp.o
[ 34%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/Plot2D.cpp.o
[ 35%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/PTWXDlg.cpp.o
[ 35%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/huginConfig.cpp.o
[ 36%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/MyExternalCmdExecDialog.cpp.o
[ 36%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/platform.cpp.o
[ 37%] Building CXX object src/hugin1/base_wx/CMakeFiles/
huginbasewx.dir/RunStitchPanel.cpp.o

Linking CXX shared library libhuginbasewx.dylib
ld: warning: in CMakeFiles/huginbasewx.dir/ImageCache.cpp.o, file is
not of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/MyProgressDialog.cpp.o,
file is not of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/Plot2D.cpp.o, file is not
of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/PTWXDlg.cpp.o, file is not
of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/huginConfig.cpp.o, file is
not of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/
MyExternalCmdExecDialog.cpp.o, file is not of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/platform.cpp.o, file is not
of required architecture
ld: warning: in CMakeFiles/huginbasewx.dir/RunStitchPanel.cpp.o, file
is not of required architecture
ld: warning: in ../../hugin_base/libhuginbase.0.0.dylib, file is not
of required architecture
ld: warning: in ../../hugin_base/libhuginbase.0.0.dylib, file is not
of required architecture
ld: warning: in /opt/local/lib/libboost_thread-mt.dylib, file is not
of required architecture
ld: warning: in /opt/local/lib/libboost_date_time-mt.dylib, file is
not of required architecture
ld: warning: in /usr/local/lib/libpano13.dylib, file is not of
required architecture
ld: warning: in /opt/local/lib/libGLEW.dylib, file is not of required
architecture
ld: warning: in ../../foreign/levmar/libhuginlevmar.a, file is not of
required architecture
ld: warning: in ../../foreign/vigra/vigra_impex/libhuginvigraimpex.
0.0.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libImath.dylib, file is not of required
architecture
ld: warning: in /opt/local/lib/libIlmImf.dylib, file is not of
required architecture
ld: warning: in /opt/local/lib/libIex.dylib, file is not of required
architecture
ld: warning: in /opt/local/lib/libHalf.dylib, file is not of required
architecture
ld: warning: in /opt/local/lib/libIlmThread.dylib, file is not of
required architecture
ld: warning: in /opt/local/lib/libexiv2.dylib, file is not of required
architecture
ld: warning: in /usr/local/lib/libpano13.dylib, file is not of
required architecture
ld: warning: in /opt/local/lib/libGLEW.dylib, file is not of required
architecture
ld: in /opt/local/lib/libsqlite3.dylib, file is not of required
architecture

collect2: ld returned 1 exit status
make[2]: *** [src/hugin1/base_wx/libhuginbasewx.0.0.dylib] Error 1
make[1]: *** [src/hugin1/base_wx/CMakeFiles/huginbasewx.dir/all] Error
2
make: *** [all] Error 2


Any experts out there?

Harry van der Wolf

unread,
Sep 4, 2010, 5:31:33 PM9/4/10
to hugi...@googlegroups.com
Hi,

2010/9/4 sansloesa <mhale...@googlemail.com>
<snip>
 
ld: warning: in /opt/local/lib/libexiv2.dylib, file is not of required
architecture
ld: warning: in /usr/local/lib/libpano13.dylib, file is not of
required architecture
ld: warning: in /opt/local/lib/libGLEW.dylib, file is not of required
architecture
ld: in /opt/local/lib/libsqlite3.dylib, file is not of required
architecture

collect2: ld returned 1 exit status
make[2]: *** [src/hugin1/base_wx/libhuginbasewx.0.0.dylib] Error 1
make[1]: *** [src/hugin1/base_wx/CMakeFiles/huginbasewx.dir/all] Error
2
make: *** [all] Error 2



The point is that macports compiles for the default architecture on you Mac.
Please do a "lipo -info  /opt/local/lib/libGLEW.dylib"  or a "lipo -info"  for one of the other libraries.
Also do a "lipo -info /usr/local/lib/libpano13.dylib" as I need to know for which architecture libpano is compiled. It needs some manual libtool actions in some cases.

I have to rewrite the wiki for Snow Leopard as it behaves differently. I myself am not that long on Snow Leopard either.

Based on the "lipo -info" information I can give you more info what CFLAGS and CXXFLAGS you have to set to compile Hugin on OSX.
Maybe you even have to rebuild the macports dependencies. I can only tell you after you have given me the necessary info.

Harry

sansloesa

unread,
Sep 6, 2010, 10:32:51 AM9/6/10
to hugin and other free panoramic software
Hi Harry,

thank you so much for your fast response.

Here comes my output from "lipo -info" for all libraries, where the
make-output says: " file is
not of required architecture".


Non-fat file: /opt/local/lib/libsqlite3.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libGLEW.dylib is architecture: x86_64
Non-fat file: /usr/local/lib/libpano13.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libexiv2.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libIlmThread.dylib is architecture:
x86_64
Non-fat file: /opt/local/lib/libHalf.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libIex.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libIlmImf.dylib is architecture: x86_64
Non-fat file: /opt/local/lib/libImath.dylib is architecture: x86_64
Non-fat file: /Users/martin/panotools/trunk/libpano/hugin_build/src/
foreign/vigra/vigra_impex/libhuginvigraimpex.0.0.dylib is
architecture: x86_64
input file /Users/martin/panotools/trunk/libpano/hugin_build/src/
foreign/levmar/libhuginlevmar.a is not a fat file
Non-fat file: /Users/martin/panotools/trunk/libpano/hugin_build/src/
foreign/levmar/libhuginlevmar.a is architecture: x86_64
Non-fat file: /opt/local/lib/libboost_date_time-mt.dylib is
architecture: x86_64
Non-fat file: /opt/local/lib/libboost_thread-mt.dylib is architecture:
x86_64
Non-fat file: /Users/martin/panotools/trunk/libpano/hugin_build/src/
hugin_base/libhuginbase.0.0.dylib is architecture: x86_64

What do you think?

Martin

Harry van der Wolf

unread,
Sep 6, 2010, 11:01:12 AM9/6/10
to hugi...@googlegroups.com
Hi Martin,

2010/9/6 sansloesa <mhale...@googlemail.com>

Please have a look at the mail thread at [1].
The solution I mentioned there is exactly the same as for your situation.
I also modified the wiki [2] to reflect the necessary Snow Leopard adaptations to the build process.

Harry



[1]: <http://groups.google.com/group/hugin-ptx/browse_thread/thread/c28fa8f4c73743be>
[2] <http://wiki.panotools.org/Hugin_Compiling_OSX>

sansloesa

unread,
Sep 9, 2010, 3:39:24 PM9/9/10
to hugin and other free panoramic software
Hi Harry,

I don't know on which thread I should come back, so I choose this one,
though I followed you instructions carefully in your updated wiki and
in:
> [1]: <http://groups.google.com/group/hugin-ptx/browse_thread/thread/c28fa8f...>

And - bingo - hugin builds all the way to 100%. So thank you for all
your advice.

But - sorry - it will not run. After starting huigin.app it will crash
immediately, telling me

...
Process: Hugin [74513]
Path: /Applications/Hugin.app/Contents/MacOS/Hugin
Identifier: net.sourceforge.hugin
Version: 2010.3.0 ()
Code Type: X86 (Native)
Parent Process: launchd [141]

Date/Time: 2010-09-09 20:37:43.833 +0200
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
...
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Dyld Error Message:
Symbol not found: _main
Referenced from: /Applications/Hugin.app/Contents/MacOS/Hugin
Expected in: flat namespace

Model: MacBookPro5,1, BootROM MBP51.007E.B05, 2 processors, Intel Core
2 Duo, 2.4 GHz, 4 GB, SMC 1.33f8
...

There were a lot of warnings when building hugin, many of them like
...
Linking CXX executable test_lensFunc
ld: warning: in CMakeFiles/test_lensFunc.dir/HermiteSpline.c.o, file
was built for i386 which is not the architecture being linked (x86_64)
[ 62%] Built target test_lensFunc
...
Linking CXX executable nona
ld: warning: in ../foreign/levmar/libhuginlevmar.a, file was built for
unsupported file format which is not the architecture being linked
(x86_64)
[ 52%] Built target nona
...
Linking CXX executable Hugin.app/Contents/MacOS/Hugin
ld: warning: in CMakeFiles/Hugin.dir/huginApp.cpp.o, file was built
for unsupported file format which is not the architecture being linked
(i386)
...

I checked with lipo
HaleMBP:lib martin$ cd /opt/local/lib
HaleMBP:lib martin$ lipo -info *.dylib | grep -v i386
-- nothing --

HaleMBP:lib martin$ cd /usr/local/lib
HaleMBP:lib martin$ lipo -info *.dylib | grep -v i386
Non-fat file: libhuginANN.0.0.dylib is architecture: x86_64
Non-fat file: libhuginANN.dylib is architecture: x86_64
Non-fat file: libhuginbase.0.0.dylib is architecture: x86_64
Non-fat file: libhuginbase.dylib is architecture: x86_64
Non-fat file: libhuginvigraimpex.0.0.dylib is architecture: x86_64
Non-fat file: libhuginvigraimpex.dylib is architecture: x86_64

So maybe these libraries are the reason? But why did they not compile
with i386 as all others did?

Have an idea?
Thank you for your support
Martin

Harry van der Wolf

unread,
Sep 9, 2010, 3:58:20 PM9/9/10
to hugi...@googlegroups.com
Hi Martin,

2010/9/9 sansloesa <mhale...@googlemail.com>
Hi Harry,

I don't know on which thread I should come back, so I choose this one,
though I followed you instructions carefully in your updated wiki and
in:
> [1]: <http://groups.google.com/group/hugin-ptx/browse_thread/thread/c28fa8f...>

And - bingo - hugin builds all the way to 100%. So thank you for all
your advice.

But - sorry - it will not run. After starting huigin.app it will crash
immediately, telling me

Have an idea?
Thank you for your support
Martin


Can you mail me your CMakeCache.txt. You will find it in your build directory.

Second to that (after! you saved/mailed me the CMakeCache.txt) do a "rm CMakeCache.txt" in the build directory. I will add that in the wiki as a prerequisite when rebuilding.

Then do the:
export CFLAGS="-arch i386 -I/opt/local/include -L/opt/local/lib"
export CXXFLAGS=$CFLAGS
followed by the
"cmake ../hugin" (depending on your your build directory)
and then the "make" again.
After the "make" you could do from your build directory a "lipo -info src/hugin_base/libhuginbase.dylib" before really installing.

Harry

sansloesa

unread,
Sep 9, 2010, 5:30:04 PM9/9/10
to hugin and other free panoramic software
Hi Harry,

(got my CMakeCache.txt ?)

Now Hugin starts!!! -Thank's a lot!
(though it will not generate control points yet, and I get a warning
that it can't find autopano-noop.sh)

There were no warnings with mismatching architectures anymore.
And lipo -info on libhuginbase.dylib gives me
> Non-fat file: src/hugin_base/libhuginbase.dylib is architecture: i386


But I don't understand this behaviour. I followed your advice, but it
seems to me, as if all these settings are exactly the same as when
building Hugin the first time?

Still a little confused,
BR
Martin

Harry van der Wolf

unread,
Sep 12, 2010, 8:53:22 AM9/12/10
to hugi...@googlegroups.com
Hi Martin,

2010/9/9 sansloesa <mhale...@googlemail.com>
Hi Harry,

Nice to hear it works now.
I had not received your cmakecache.txt until I thought of looking in my spam box: there it was.

When looking at your cmakecache.txt I see the following lines:

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING='-arch i386 -I/opt/local/include -L/opt/local/lib '

This is really weird. Why are there no cxx flags?
It's the same issue Darrell mentioned in his mail [1].

Please issue a "cmake --version" and a "port installed | grep cmake"  on your command line.
A couple of weeks ago I had serious problems with cmake 2.8.1 when testing the 2010.2_beta2. These issues were resolved when switching to 2.8.2.
So if you are at 2.8.1 or older please do update your cmake.

Harry



[1]: <http://groups.google.com/group/hugin-ptx/browse_thread/thread/c28fa8f4c73743be/7bd4518bc66d1565>



sansloesa

unread,
Sep 16, 2010, 4:49:43 PM9/16/10
to hugin and other free panoramic software
Hi Harry,

thanks for your efforts supporting us, andsorry that I was delayed
with this answer...

My versions:

HaleMBP:~ martin$ cmake --version
cmake version 2.8.2

and


HaleMBP:~ martin$ port installed | grep cmake
cmake @2.8.2_2+universal (active)

What do you think?

Regards
Martin

Harry van der Wolf

unread,
Sep 17, 2010, 2:10:43 AM9/17/10
to hugi...@googlegroups.com
Hi Martin,

2010/9/16 sansloesa <mhale...@googlemail.com>

I think that's OK. I had issues with 2.8.1. I just wanted to know whether you were using the same version.

Harry
Reply all
Reply to author
Forward
0 new messages