Bug 115104 - Fails to build in 64 bit architectures
Summary: Fails to build in 64 bit architectures
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: 3.4.x
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
: 113537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-26 10:00 UTC by Adeodato Simó
Modified: 2010-08-03 18:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix kdebindings FTBFS by making QPointArray::{begin,end} return jlong instead of jint (2.54 KB, patch)
2005-10-26 10:02 UTC, Adeodato Simó
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adeodato Simó 2005-10-26 10:00:49 UTC
While preparing updated 3.4.2 packages for Debian unstable, we found that 
kdebindings failed to build from source on 64 bit architectures with the 
following error: 
 
    qtjava/javalib/qtjava/QPointArray.cpp:279: error: cast from 'QPoint*' to 
'jint' loses precision 
 
This affects architectures like alpha, ia64 and amd64. Complete logs can be 
fetched from 
http://buildd.debian.org/fetch.php?&pkg=kdebindings&ver=4%3A3.4.2-1&arch=ia64&stamp=1129866203&file=log&as=raw 
and 
http://buildd.debian.org/fetch.php?&pkg=kdebindings&ver=4%3A3.4.2-1&arch=alpha&stamp=1129867513&file=log&as=raw. 
 
The compiler was GCC 4.0.2 (mentioned at the top of the log). 
 
 
Steve Langasek <vorlon@debian.org> provided a patch that changes the return 
value of QPointArray::begin and ::end to return a jlong instead of jint. 
Attached.
Comment 1 Adeodato Simó 2005-10-26 10:02:47 UTC
Created attachment 13154 [details]
Fix kdebindings FTBFS by making QPointArray::{begin,end} return jlong instead of jint
Comment 2 Richard Dale 2005-10-26 10:58:24 UTC
SVN commit 474384 by rdale:

* Removed QPointArray.begin() and end() methods as they don't compile
  on 64 bit machines, and Iterators can't be used in QtJava anyway.
  Fixes problem reported by Adeodato S.

CCBUGS: 115104



 M  +6 -0      ChangeLog  
 M  +0 -2      javalib/org/kde/qt/QPointArray.java  
 M  +0 -12     javalib/qtjava/QPointArray.cpp  
 M  +0 -2      javalib/qtjava/QPointArray.h  


--- branches/KDE/3.5/kdebindings/qtjava/ChangeLog #474383:474384
@@ -1,3 +1,9 @@
+2005-10-26  Richard Dale  <Richard_Dale@tipitina.demon.co.uk>
+
+	* Removed QPointArray.begin() and end() methods as they don't compile
+	  on 64 bit machines, and Iterators can't be used in QtJava anyway.
+	  Fixes problem reported by Adeodato S.
+
 2005-10-23  Richard Dale  <Richard_Dale@tipitina.demon.co.uk>
 
 	* Regenerated the java bindings from the Qt 3.3.5 headers
--- branches/KDE/3.5/kdebindings/qtjava/javalib/org/kde/qt/QPointArray.java #474383:474384
@@ -63,8 +63,6 @@
 	public native boolean isNull();
 	public native boolean resize( int size);
 	public native boolean truncate( int pos);
-	public native int begin();
-	public native int end();
 	public native QPoint at(int index);
 	
 }
--- branches/KDE/3.5/kdebindings/qtjava/javalib/qtjava/QPointArray.cpp #474383:474384
@@ -273,18 +273,6 @@
 	return (jboolean) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->truncate((uint) pos);
 }
 
-JNIEXPORT jint JNICALL
-Java_org_kde_qt_QPointArray_begin(JNIEnv *env, jobject obj)
-{
-	return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->begin();
-}
-
-JNIEXPORT jint JNICALL
-Java_org_kde_qt_QPointArray_end(JNIEnv *env, jobject obj)
-{
-	return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->end();
-}
-
 JNIEXPORT jobject JNICALL
 Java_org_kde_qt_QPointArray_at(JNIEnv * env, jobject obj, jint index)
 {
--- branches/KDE/3.5/kdebindings/qtjava/javalib/qtjava/QPointArray.h #474383:474384
@@ -41,8 +41,6 @@
 extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_isNull (JNIEnv *env, jobject);
 extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_resize (JNIEnv *env, jobject, jint);
 extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_truncate (JNIEnv *env, jobject, jint);
-extern JNIEXPORT jint JNICALL Java_org_kde_qt_QPointArray_begin (JNIEnv *env, jobject);
-extern JNIEXPORT jint JNICALL Java_org_kde_qt_QPointArray_end (JNIEnv *env, jobject);
 extern JNIEXPORT jobject JNICALL Java_org_kde_qt_QPointArray_at (JNIEnv *env, jobject, jint);
 
 #ifdef __cplusplus
Comment 3 Richard Dale 2005-10-26 10:59:37 UTC
SVN commit 474385 by rdale:

* Removed QPointArray.begin() and end() methods as they don't compile
  on 64 bit machines, and Iterators can't be used in QtJava anyway.
  Fixes problem reported by Adeodato S.

CCBUGS: 115104



 M  +0 -12     kalyptusCxxToJNI.pm  


--- branches/KDE/3.5/kdebindings/kalyptus/kalyptusCxxToJNI.pm #474384:474385
@@ -1322,18 +1322,6 @@
 	return (jboolean) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->truncate((uint) pos);
 }
 
-JNIEXPORT jint JNICALL
-Java_org_kde_qt_QPointArray_begin(JNIEnv *env, jobject obj)
-{
-	return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->begin();
-}
-
-JNIEXPORT jint JNICALL
-Java_org_kde_qt_QPointArray_end(JNIEnv *env, jobject obj)
-{
-	return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->end();
-}
-
 JNIEXPORT jobject JNICALL
 Java_org_kde_qt_QPointArray_at(JNIEnv * env, jobject obj, jint index)
 {
Comment 4 Adeodato Simó 2005-10-26 22:16:49 UTC
*** Bug 113537 has been marked as a duplicate of this bug. ***
Comment 5 FiNeX 2010-08-03 17:45:45 UTC
Hi! Is this bug still valid on KDE 4?
Comment 6 Arno Rehn 2010-08-03 18:06:40 UTC
No. QtJava hasn't been ported to KDE4. And it's been fixed anyway from what it says in Richards commit message.