[Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono

Dimitar Dobrev dpldobrev at yahoo.com
Mon Sep 10 18:32:20 UTC 2012


Vivek,

The key here was this - http://www.mono-project.com/Interop_with_Native_Libraries#lib-name-note. As you saw, Qyoto used to append a "2" after "so" - ".so.2". As you can read at the link, this caused the need of the DLL map (now removed) which in turn prevented the *.dylibs from being found because they were not mentioned in it. So I needed to get rid of this ".2" at the end. That's why I simply removed these properties:

VERSION 2.0.0
SOVERSIOH 2

from the CMake lists so that I get just <libname>.so. As in all lists except one these were the only properties specified, I deleted the whole set_target_properties statements.

Nice to hear you are doing some tests. Good luck and be sure to write here about any problems you may find.



________________________________
 From: Vivek Gani <vivekgani at gmail.com>
To: Dimitar Dobrev <dpldobrev at yahoo.com>; KDE bindings for other programming languages <kde-bindings at kde.org> 
Sent: Monday, September 10, 2012 3:46 AM
Subject: Re: [Kde-bindings] Fw: Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono
 
Hey Dimitar, 

Thanks, make & make install now work!  

Just curious, how'd you reason that you just needed to remove the target properties field? I'm still a bit of a newbie to cmake. 

Going to try some code tests (maybe attempt compiling synapse.im) soon.

--
Vivek Gani
vivek at gani.org


On Sunday, September 9, 2012 at 2:51 PM, Dimitar Dobrev wrote:

> 
> 
> ----- Forwarded Message -----
> From: Dimitar Dobrev <dpldobrev at yahoo.com (mailto:dpldobrev at yahoo.com)>
> To: Vivek Gani <vivekgani at gmail.com (mailto:vivekgani at gmail.com)> 
> Sent: Sunday, September 9, 2012 10:50 PM
> Subject: Re: [Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono
> 
> I've just pushed some changes that remove the requirement for any DLL maps (just pull and rebuild assemblygen), could you try them?
> 
> From: Vivek Gani <vivekgani at gmail.com (mailto:vivekgani at gmail.com)>
> To: Dimitar Dobrev <dpldobrev at yahoo.com (mailto:dpldobrev at yahoo.com)>; KDE bindings for other programming languages <kde-bindings at kde.org (mailto:kde-bindings at kde.org)> 
> Sent: Sunday, September 9, 2012 7:19 AM
> Subject: Re: [Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono
> 
> so far no luck, I tried your suggestion of removing the suffixes in the dllimport AND not adding dllmap to the app.config, and of course renaming .so.2 references to .dylib. 
> 
> Also tried adding the dllmap to the app.config anyways, still didn't fix it. 
> 
> -- 
> Vivek Gani
> 
> 
> On Saturday, September 8, 2012 at 6:36 PM, Vivek Gani wrote:
> 
> > Thanks for the fast response Dimitar! I'll try it out and give you an update 
> > 
> > --
> > Vivek Gani
> > 
> > 
> > On Saturday, September 8, 2012 at 6:20 PM, Dimitar Dobrev wrote:
> > 
> > > Hi,
> > > 
> > > You are correct: you should add <dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" /> to assemblygen/src/app.config. Also, do the same for each assemblygen/assemblies/qyoto-<QtModule>/CMakeLists.txt (there is an <dllmap dll=\"qyoto-qtcore-native\" target=\"libqyoto-qtcore-native.so.2\"/>, just change ".so.2" to ".dylib").
> > > 
> > > I was going to send patches but these lines at the link you posted:
> > > 
> > > 
> > > 
> > > Instead, just use the library name itself, without any prefixes or suffixes, and rely on the runtime to find the appropriate library at runtime. For example: 
> > > [DllImport ("MyLibrary")] private static extern void Frobnicate ();
> > > Then, you just need to provide MyLibrary.dll for Windows platforms, libMyLibrary.so for Unix platforms, and libMyLibrary.dylib for Mac OS X platforms 
> > > 
> > > 
> > > 
> > > suggest that no DLL maps are needed because if the names do not contain dots (and in our case they don't) the "lib" prefix and the ".dylib" suffix are automatically resolved. So I'd like to dig further into the issue and make this work with no maps if possible.
> > > 
> > > From: Vivek Gani <vivekgani at gmail.com (mailto:vivekgani at gmail.com) (mailto:vivekgani at gmail.com)>
> > > To: kde-bindings at kde.org (mailto:kde-bindings at kde.org) (mailto:kde-bindings at kde.org) 
> > > Sent: Sunday, September 9, 2012 12:05 AM
> > > Subject: [Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono
> > > 
> > > Hey all, 
> > > 
> > > I'm currently having some issues which I think I'm close to fixing, but was wondering if anyone has already encountered it before:
> > > 
> > > The Issue:
> > > 
> > > I can successfully compile smokegen & smokeqt (using homebrew), but when i make assemblygen it seems setup to expect a .dll. 
> > > 
> > > [ 1%] Built target assemblygen
> > > [ 2%] Building CXX object src/CMakeFiles/assemblygen-native.dir/assemblygen-native.cpp.o
> > > Linking CXX shared library ../bin/libassemblygen-native.dylib
> > > [ 2%] Built target assemblygen-native
> > > [ 4%] Built target QyotoGenerator
> > > [ 5%] Building CXX object src/plugins/qyoto/CMakeFiles/qyotogenerator-native.dir/qyotogenerator-native.cpp.o
> > > /Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:33:16: warning: 
> > > initialization of pointer of type 'const QMetaObject *' to null from a constant
> > > boolean expression [-Wbool-conversions]
> > > return false;
> > > ^~~~~
> > > /Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:37:16: warning: 
> > > initialization of pointer of type 'const QMetaObject *' to null from a constant
> > > boolean expression [-Wbool-conversions]
> > > return false;
> > > ^~~~~
> > > 2 warnings generated.
> > > Linking CXX shared library ../../../bin/libqyotogenerator-native.dylib
> > > [ 5%] Built target qyotogenerator-native
> > > [ 7%] Generating ../../bin/qyoto-qtcore.dll
> > > Unhandled Exception: System.DllNotFoundException: assemblygen-native
> > > at (wrapper managed-to-native) MainClass:InitSmoke (string)
> > > at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
> > > [ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: assemblygen-native
> > > at (wrapper managed-to-native) MainClass:InitSmoke (string)
> > > at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
> > > make[2]: *** [bin/qyoto-qtcore.dll] Error 1
> > > make[1]: *** [assemblies/qyoto-qtcore/CMakeFiles/qyoto-qtcore.dir/all] Error 2
> > > make: *** [all] Error 2
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > after staring at http://www.mono-project.com/Interop_with_Native_Libraries , I realize I need something along the lines of
> > > 
> > > <configuration> <dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" /> </configuration>
> > > 
> > > in a cmakelist file. Any tips on how to write this in? 
> > > 
> > > 
> > > my setup so far:
> > > 
> > > install qt 8.4.2
> > > $ brew install qt
> > > 
> > > compile mono using homebrew (using the adamv/alt keg). 
> > > $ brew install mono
> > > 
> > > compile smokegen for 64-bit:
> > > $ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=amd64" .
> > > $ make install
> > > 
> > > compile smokeqt:
> > > $ cmake -DSmoke_DIR="$PWD/../smokegen/cmake" .
> > > $ make install
> > > 
> > > Try to compile qyoto for 64-bit
> > > $ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64" .
> > > $ make install
> > > 
> > > 
> > > NOTE: it seems like others have had this issue before too - check out 
> > > 
> > > --
> > > Vivek Gani
> > > 
> > > _______________________________________________
> > > Kde-bindings mailing list
> > > Kde-bindings at kde.org (mailto:Kde-bindings at kde.org) (mailto:Kde-bindings at kde.org)
> > > https://mail.kde.org/mailman/listinfo/kde-bindings
> > > 
> > > 
> > > _______________________________________________
> > > Kde-bindings mailing list
> > > Kde-bindings at kde.org (mailto:Kde-bindings at kde.org) (mailto:Kde-bindings at kde.org)
> > > https://mail.kde.org/mailman/listinfo/kde-bindings
> > 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org (mailto:Kde-bindings at kde.org)
> https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20120910/e5915684/attachment-0001.html>


More information about the Kde-bindings mailing list