New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Added Mac OS X support

General discussion

Re: Added Mac OS X support

Postby det » Mon Aug 15, 2011 10:28 am

Thanks strannik! Your latest .dmg seems to be working fine on my 32-bit, Snow Leopard. (It does have the couple issues mentioned earlier: the scrolling is rather sluggish, and scan popup doesn't work.)

One question: where would I find the qt-style.css and article-style.css?
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Added Mac OS X support

Postby chulai » Mon Aug 15, 2011 10:49 am

It works for me too. Incidentally, I could make work the first FAT binary by creating a symblink /usr/X11/liblibX11.6.dylib -> /opt/X11/lib/libX11.6.dylib to the XQuartz newer libs. Then I removed the symlink and can confirm the last dmg file works too without X11 dependency in Snow Leopard 32-bit.

In the other hand, I still can't build both 32 and 64-bit version with your last changes (hash 0c095dbeaf6c6ce877f2c2b35bd035742da7f254) in the repository:

g++ -c -pipe -rdynamic -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/hunspell/1.3.2/include/hunspell -Wall -W -DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\" -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_flags.o build/qrc_flags.cpp
g++ -headerpad_max_install_names -rdynamic -arch x86_64 -arch i386 -Xarch_x86_64 -mmacosx-version-min=10.5 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o -F/Library/Frameworks -L/Library/Frameworks -lz -liconv -Lmaclibs/lib -L/usr/lib -L/usr/local/Cellar/libvorbis/1.3.2/lib -L/usr/local/Cellar/libogg/1.2.2/lib -lvorbisfile -lvorbis -lm -logg -L/usr/local/Cellar/hunspell/1.3.2/lib -lhunspell-1.3 -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbisfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libogg/1.2.2/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/hunspell/1.3.2/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"Hunspell::free_list(char***, int)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"Hunspell::analyze(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
"Hunspell::~Hunspell()", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
"Hunspell::spell(char const*, int*, char**)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellPrefixMatchRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_info", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"Hunspell::suggest(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_read", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::convert(void const*&, unsigned long&, void*&, unsigned long&)in iconv.o
"Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
HunspellMorpho::makeDictionaries(Config::Hunspell const&) in hunspell.o
"Hunspell::get_dic_encoding()", referenced from:
HunspellMorpho::(anonymous namespace)::decodeFromHunspell(Hunspell&, char const*)in hunspell.o
HunspellMorpho::(anonymous namespace)::encodeToHunspell(Hunspell&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)in hunspell.o
"_libiconv_open", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::reinit(char const*, char const*)in iconv.o
Iconv::Iconv(char const*, char const*)in iconv.o
"_ov_open_callbacks", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_ov_pcm_seek", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv_close", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::~Iconv()in iconv.o
Iconv::reinit(char const*, char const*)in iconv.o
"_ov_clear", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/7u/7uJ+y36XGnyfZ9WQYgmDFk+++TI/-Tmp-//cc7qokNZ.out (No such file or directory)
make: *** [goldendict.app/Contents/MacOS/goldendict] Error 1


Keep looking at system installed libs?:

ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libogg/1.2.2/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/hunspell/1.3.2/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)

Thanks for all the great work
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 12:41 pm

Hmm, this time it's weird - seems like it still pulls libs from Brew. Please be sure to rebuild the whole project (just in case).
Also, as you're using 32-bit system, you should remove x86_64 from arch list in goldendict.pro.. (Maybe there's a way to make it choose the right ones automatically?)
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 12:44 pm

det wrote:where would I find the qt-style.css and article-style.css?

Sorry, what do you want to do with them? They are in the root directory of Goldendict project folder..
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Mon Aug 15, 2011 1:54 pm

strannik wrote:Hi Chulai,
1) glad you resolved this one! can you push it to your fork on github?


Just wondering, are you experiencing the same issue as me with time_t? If yes, I can commit the fix, if not I don't know what's happening!

strannik wrote:P.S. I found an easy way to include support for hotkeys, just don't have time at the moment to implement it; I'll take a look later. Seems like there's also a ready-to-use cocoa API for pop-up functionality. Needs some work, but can definitely be included as well.


That's great! We could have OS X version on par with the other ones.

strannik wrote:Hmm, this time it's weird - seems like it still pulls libs from Brew. Please be sure to rebuild the whole project (just in case).
Also, as you're using 32-bit system, you should remove x86_64 from arch list in goldendict.pro.. (Maybe there's a way to make it choose the right ones automatically?)


Yes, I tried a lot of time doing a clean all, running qmake, etc with no avail. I'm going to keep trying different things. I assume that I don't need to be in a 64-bit version OS X to compile a 64-bit version of GoldenDict. And I'm pretty sure the compiler keeps looking in the wrong place for the extra libs. If nothing works, maybe we can make some tweeks in the goldendict.pro file to build only 32-bit version when we are under 32-bit OS X, otherwise build a Univerval version.

I guess det want to knows where the generated GoldenDict program looks for the qt-style.css. And not where it is located during the development phase.

Thanks,

Chulai
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 15, 2011 2:13 pm

1) No issues with time_t :)
2) This one should work correctly:
Code: Select all
mac {
    contains(QMAKE_HOST.arch, x86_64) {
        CONFIG += x86 x86_64
    } else {
        CONFIG += x86
    }
    ...
}
3) ikm wrote:
Code: Select all
Yes, you can create qt-style.css file in your ~/.goldendict and adjust settings there. See qt-style.css in the goldendict source code tree to get a clue on how the default one looks like.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Wed Aug 17, 2011 10:32 am

strannik wrote:1) No issues with time_t :)


I made some little research about time_t issue.

Under Linux I have this path of includes:
dictzip.h
<zlib.h>
<zconf.h>
<sys/types.h>
<time.h>
and there you have defined: typedef long time_t


Then, under Windows I have this path of includes:
dictzip.h
<stdio.h>
<sys/types>
and there I have defined: typedef long time_t


And finally, under OS X 32-bit I have this path of includes:
dictzip.h
<stdio.h>
<_types.h>
<sys/_types.h>
<machine/_types.h>
i386/_types.h
and there I have defined: typedef long __darwin_time_t
which I suppose is the equivalent of time_t

I don't understand why it works for you without any change. Can you tell me please your path to the time_t typedef? With that info I could made the proper fix.


strannik wrote:2) This one should work correctly:
Code: Select all
mac {
    contains(QMAKE_HOST.arch, x86_64) {
        CONFIG += x86 x86_64
    } else {
        CONFIG += x86
    }
    ...
}



Yes, it works now! Still I'm going to try to build an Universal binary if possible. I think I'm close to find the solution. ;)


strannik wrote:3) ikm wrote:
Code: Select all
Yes, you can create qt-style.css file in your ~/.goldendict and adjust settings there. See qt-style.css in the goldendict source code tree to get a clue on how the default one looks like.


Yes, I could find the folder under my user's home. So it's the same as in Ubuntu Linux.

Thanks
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Wed Aug 17, 2011 12:09 pm

1) Mine is defined as '__darwin_time_t time_t' if I move cursor above the line with 'time_t mtime;' in dictzip.h in Qt Creator, and I didn't have problems in 64-bit Snow Leo either. I suppose it might be an issue with gcc on 32-bit systems so that it doesn't automatically find the definition? (something like #include <time.h> is included in 64-bit gcc system headers but not in 32-bit gcc version :)
Also, on my system
Code: Select all
grep  __darwin_time_t /usr/include/* -r
/usr/include/i386/_types.h:typedef long         __darwin_time_t;   /* time() */
/usr/include/pwd.h:   __darwin_time_t pw_change;      /* password change time */
/usr/include/pwd.h:   __darwin_time_t pw_expire;      /* account expiration */
/usr/include/sys/_structs.h:   __darwin_time_t   tv_sec;
/usr/include/sys/_structs.h:   __darwin_time_t      tv_sec;      /* seconds */
/usr/include/sys/msg.h:typedef   __darwin_time_t      time_t;
/usr/include/sys/select.h:typedef   __darwin_time_t      time_t;
/usr/include/sys/sem.h:typedef   __darwin_time_t   time_t;
/usr/include/sys/shm.h:typedef   __darwin_time_t   time_t;
/usr/include/sys/stat.h:typedef   __darwin_time_t      time_t;
/usr/include/sys/time.h:typedef   __darwin_time_t   time_t;
/usr/include/sys/timeb.h:typedef   __darwin_time_t   time_t;
/usr/include/sys/types.h:typedef   __darwin_time_t      time_t;
/usr/include/time.h:typedef   __darwin_time_t      time_t;
/usr/include/utime.h:typedef __darwin_time_t      time_t;
/usr/include/utmp.h:typedef __darwin_time_t   time_t;

So, I suppose you can just try this 'hack':
Code: Select all
--------------------------------- dictzip.c ----------------------------------
@@ -23,6 +23,7 @@
  */
 
 #include <stdlib.h>
+#include <time.h>
 #include "dictzip.h"
 #include <limits.h>
 #include <stdarg.h>

2) Seems like the only problem in building universal binary on your system is in those 3rd-party libraries (sorry it wasn't quite clear for me before). Could you please reproduce the errors it gave you if you come back:
Code: Select all
------------------------------- goldendict.pro --------------------------------
@@ -89,11 +89,7 @@ unix {
     INSTALLS += desktops2
 }
 mac {
-    contains(QMAKE_HOST.arch, x86_64) {
-        CONFIG += x86 x86_64
-    } else {
-        CONFIG += x86
-    }
+    CONFIG += x86 x86_64
     LIBS = -lz \
         -liconv \
         -lvorbisfile \
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Sun Aug 21, 2011 10:24 pm

1) Tried your 'hack' and worked successfully across several environment: OS X, Win 7 and Ubuntu 11.04 so I just commited it to the repo. Thanks!

2) I tried zillion of qmake/make configurations with no success. I give up! For what I read here http://www.trinitydesktop.org/docs/qt4/ ... n-mac.html I'm not quite sure if it is even possible to build 64-bit binary in a 32-bit architecture:

In general, Qt supports building on one Mac OS X version and deploying on all others, both forward and backwards. You can build on 10.4 Tiger and run the same binary on 10.5 and up.

Some restrictions apply:
    Some functions and optimization paths that exist in later versions of Mac OS X will not be available if you build on an earlier version of Mac OS X.
    The CPU architecture should match.
    Cocoa support is only available for Mac OS X 10.5 and up.


I guess compiling to 32-bit is ok for me as long as you and other developers can build a 32/64 FAT binary for release.

Anyway, your QMAKE_HOST.arch condition worked great! To answer your request, this is what I get with "CONFIG += x86 x86_64" instead:


g++ -c -pipe -rdynamic -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libvorbis/1.3.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/libogg/1.2.2/include -I/usr/local/Cellar/hunspell/1.3.2/include/hunspell -Wall -W -DPROGRAM_DATA_DIR=\"/usr/local/share/apps/goldendict/\" -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_flags.o build/qrc_flags.cpp
g++ -headerpad_max_install_names -rdynamic -arch x86_64 -arch i386 -Xarch_x86_64 -mmacosx-version-min=10.5 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o -F/Library/Frameworks -L/Library/Frameworks -lz -liconv -Lmaclibs/lib -L/usr/lib -L/usr/local/Cellar/libvorbis/1.3.2/lib -L/usr/local/Cellar/libogg/1.2.2/lib -lvorbisfile -lvorbis -lm -logg -L/usr/local/Cellar/hunspell/1.3.2/lib -lhunspell-1.3 -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbisfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libogg/1.2.2/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/hunspell/1.3.2/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"Hunspell::free_list(char***, int)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"Hunspell::analyze(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
"Hunspell::~Hunspell()", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
"Hunspell::spell(char const*, int*, char**)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellPrefixMatchRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_info", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"Hunspell::suggest(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_read", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::convert(void const*&, unsigned long&, void*&, unsigned long&)in iconv.o
"Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
HunspellMorpho::makeDictionaries(Config::Hunspell const&) in hunspell.o
"Hunspell::get_dic_encoding()", referenced from:
HunspellMorpho::(anonymous namespace)::decodeFromHunspell(Hunspell&, char const*)in hunspell.o
HunspellMorpho::(anonymous namespace)::encodeToHunspell(Hunspell&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)in hunspell.o
"_libiconv_open", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::reinit(char const*, char const*)in iconv.o
Iconv::Iconv(char const*, char const*)in iconv.o
"_ov_open_callbacks", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_ov_pcm_seek", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_libiconv_close", referenced from:
Babylon::convertToUtf8(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)in bgl_babylon.o
Iconv::~Iconv()in iconv.o
Iconv::reinit(char const*, char const*)in iconv.o
"_ov_clear", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/7u/7uJ+y36XGnyfZ9WQYgmDFk+++TI/-Tmp-//ccGAr8UT.out (No such file or directory)
make: *** [goldendict.app/Contents/MacOS/goldendict] Error 1

make: Leaving directory `/Users/chulai/Documents/goldendict'
The process "/usr/bin/make" exited with code 2.
Error while building project goldendict (target: Desktop)
When executing build step 'Make'
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Sun Aug 21, 2011 10:39 pm

chulai wrote:ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libogg/1.2.2/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/hunspell/1.3.2/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)

It still looks for Brew versions of these libraries. I don't understand why.
As for cross-building Qt apps on your platform for both 32 and 64, it SHOULD be possible. You do have 32/64-bit Cocoa for 10.5/10.6, so the excerpt about 10.4 is irrelevant..
You can even check the directory "build/" for .o files which are generated prior to the error messages:
Code: Select all
goldendict# file build/*.o

They all are built for both architectures!
So, this is really weird.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 18 guests