[Kde-bindings] Fwd: Qyoto/Kimono: A 64 bit unsafe function, build trouble on Debian unstable

Arno Rehn arno at arnorehn.de
Tue May 22 19:18:49 UTC 2007


Am Dienstag, 22. Mai 2007 schrieben Sie:
> Now to my reason for writing:  I tried compiling Qyoto (checked out from
> svn on 21 May) on my EM64T based Debian unstable system, and ran into the
> following problem when running make (after running "cmake ."):
>
> [  2%] Building CXX object CMakeFiles/qyoto.dir/src/qyoto.o
> /home/kaare/source/qyoto/src/qyoto.cpp: In function 'long int
> QyotoHash(void*)':
> /home/kaare/source/qyoto/src/qyoto.cpp:1706: error: cast from 'void*' to
> 'int' loses precision
> make[2]: *** [CMakeFiles/qyoto.dir/src/qyoto.o] Error 1
> make[1]: *** [CMakeFiles/qyoto.dir/all] Error 2
> make: *** [all] Error 2
>
> To solve the above problem, I changed the two instances of "return (int)"
> to "return (long)" in the QyotoHash() function.  However, I haven't
> examined whether this change is correct, as I have next to no C++
> experience.
Ah yes, it seems like we have to add a check whether void* is equal to long or 
int.

> Also, in Debian the Smoke library is named "smokeqt4", so I had to change
> CMakeLists.txt in the Qyoto root folder accordingly.
This appears more like a problem of Debian naming libraries differently.
It won't be a problem when it is build together with the rest of kdebindings, 
though, as the library is then build and installed before.
Maybe there should be some sort of pkg-config file in which we can look up 
correct linking flags.

> On to the next problem.
>
> I ran make again, a got the following error:
>
> [  4%] Built target qyoto
> [  4%] Building qt-dotnet.dll
> /bin/sh: debug: command not found
> [  6%] Built target qt-dotnet
>
> A snippet from the offending file ( CMakeFiles/qt.dotnet.dir/build.make ):
>
> CMakeFiles/qt-dotnet:
>         $(CMAKE_COMMAND) -E
> cmake_progress_report /home/kaare/source/qyoto/CMakeFiles
> $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E
> cmake_echo_color --switch=$(COLOR) --blue --bold "Building qt-dotnet.dll"
>         -debug -define:DEBUG -unsafe -warn:0 -out:qt-dotnet.dll
> -target:library /home/kaare/source/qyoto/src/SmokeInvocation.cs
> /home/kaare/source/qyoto/src/SmokeMarshallers.cs
> /home/kaare/source/qyoto/src/Qyoto.cs
> /home/kaare/source/qyoto/src/QyotoMetaData.cs
> /home/kaare/source/qyoto/core/*.cs /home/kaare/source/qyoto/gui/*.cs
> /home/kaare/source/qyoto/network/*.cs /home/kaare/source/qyoto/sql/*.cs
> /home/kaare/source/qyoto/xml/*.cs /home/kaare/source/qyoto/svg/*.cs
> /home/kaare/source/qyoto/opengl/*.cs /home/kaare/source/qyoto/qdbus/*.cs
>
> I guess the "-debug[...]" line should have been on the previous line.  A
> smiliar problem occurs when compiling most of the examples, etc.:
>
> [ 40%] Building collidingmice.exe
> /bin/sh: -unsafe: command not found
> make[2]: ***
> [examples/graphicsview/collidingmice/CMakeFiles/collidingmice.exe] Error
> 127 make[1]: ***
> [examples/graphicsview/collidingmice/CMakeFiles/collidingmice.exe.dir/all]
> Error 2
> make: *** [all] Error 2
>
> From the offending file (
> examples/graphicsview/colldingmice/CMakeFiles/collidingmice.exe.dir/build.m
>ake ):
>
> examples/graphicsview/collidingmice/CMakeFiles/collidingmice.exe:
>         $(CMAKE_COMMAND) -E
> cmake_progress_report /home/kaare/source/qyoto/CMakeFiles
> $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E
> cmake_echo_color --switch=$(COLOR) --blue --bold "Building
> collidingmice.exe" cd
> /home/kaare/source/qyoto/examples/graphicsview/collidingmice && -unsafe
> -warn:0 -out:collidingmice.exe -r:../../../qt-dotnet.dll
> /home/kaare/source/qyoto/examples/graphicsview/collidingmice/main.cs
> /home/kaare/source/qyoto/examples/graphicsview/collidingmice/mouse.cs
> /home/kaare/source/qyoto/examples/graphicsview/collidingmice/qrc_mouse.cs
>
> Notice the line beginning with "cd /home/kaare/source/qyoto[...]"; this
> seems to be a mix of a cd command and arguments for gmcs.
>
> Apparently, CMake version 2.4-patch 5 in Debian unstable created the files
> incorrectly or is working differently from the version of CMake you're
> using.
>
> When "collecting" the assumed improperly split lines and removing the "cd
> <path> &&" bit from the build.make files, the build finishes successfully,
> but only creating libqyoto.so, not the qt-dotnet.dll.  My fixes to the
> build.make files may be inadequate; I really have no idea what the files
> are supposed to look like when having been generated properly.
It looks like the ${GMCS_PATH} variable isn't set up properly. Therefore it is 
empty and you get these errors as above.
When you check out just qyoto, you have to check out the whole 
kdebindings/csharp module, not only kdebindings/csharp/qyoto since the check 
for gmcs lies in the kdebindings/csharp/CMakeList.txt.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list