harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chunrong Lai (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size
Date Thu, 31 Jul 2008 03:16:31 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618590#action_12618590
] 

Chunrong Lai commented on HARMONY-5914:
---------------------------------------


 Just FYI that I can successfully built Harmony SVN HEAD with GCC-4.0.2 or GCC-4.2.4 (said
fixing some bugs of GCC-4.2.3).

[clai1@MRTDlinux ~]$ cd harmony.cc/trunk/working_classlib/modules/awt/src/main/native/linuxfont/unix/
[clai1@MRTDlinux unix]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /home/clai1/install/src/gcc-4.0.2/configure --host=i686-pc-linux-gnu --prefix=/home/clai1/install
Thread model: posix
gcc version 4.0.2
[clai1@MRTDlinux unix]$ gcc -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT
-I/home/clai1/harmony.cc/trunk/working_classlib/deploy/include/ -I/home/clai1/harmony.cc/trunk/working_classlib/deploy/jdk/include/
-I. -I../shared/ -Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix
-I../../fontlib/shared -fpic -march=pentium3 -ggdb -O0 -Werror -c -o LinuxNativeFont.o LinuxNativeFont.c

[clai1@MRTDlinux unix]$ export PATH=/home/clai1/gcc-4.2.4/bin/:$PATH
[clai1@MRTDlinux unix]$ export LD_LIBRARY_PATH=/home/clai1/gcc-4.2.4/lib:$LD_LIBRARY_PATH
[clai1@MRTDlinux unix]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /home/clai1/install/gcc-4.2.4/configure --host=i686-pc-linux-gnu --prefix=/home/clai1/gcc-4.2.4/
Thread model: posix
gcc version 4.2.4
[clai1@MRTDlinux unix]$ gcc -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT
-I/home/clai1/harmony.cc/trunk/working_classlib/deploy/include/ -I/home/clai1/harmony.cc/trunk/working_classlib/deploy/jdk/include/
-I. -I../shared/ -Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix
-I../../fontlib/shared -fpic -march=pentium3 -ggdb -O0 -Werror -c -o LinuxNativeFont.o LinuxNativeFont.c

[clai1@MRTDlinux unix]$ 

> Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to
integer of different size
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5914
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5914
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Ubuntu 8.04, drlvm svn head.
>            Reporter: Steve Blackburn
>            Assignee: Chunrong Lai
>         Attachments: H5914.64bitswarnings.patch, H5914.classlib.new.patch, H5914.classlib.patch,
H5914.fixed-more-warnings.patch, More64bits.warnings.txt
>
>
> We run nightly regressions of various VMs against the dacapo suite (building from svn
nightly).  I was trying to get things working on an upgraded box.  When I tried to build drlvm,
I found that it would not compile with gcc-4.2.3.   The work-around is either to use an older
gcc, or to turn of -Werror; neither are ideal.  Or should I be doing something different with
my build? (I just followed the standard instructions for a federated build).
> The code generating the warnings looks questionable, so probably the right solution (in
this first instance) is to fix the code.
> # my gcc
> working_classlib/modules/awt/src/main/native/linuxfont/unix$  gcc -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
> # builds fine with gcc-3.3
> working_classlib/modules/awt/src/main/native/linuxfont/unix$ gcc-3.3 -DLINUX -DLINUX_X86
-DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT -I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/include
-I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/jdk/include -I. -I../shared/
-Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix -I../../fontlib/shared
 -fpic -march=pentium3 -ggdb -O0  -Werror   -c -o LinuxNativeFont.o LinuxNativeFont.c
> # builds fine with gcc-4.1
> gcc-4.1 -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT -I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/include
-I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/jdk/include -I. -I../shared/
-Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix -I../../fontlib/shared
 -fpic -march=pentium3 -ggdb -O0  -Werror   -c -o LinuxNativeFont.o LinuxNativeFont.c
> # dies with gcc-4.2.3
> gcc-4.2 -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT -I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/include
-I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/jdk/include -I. -I../shared/
-Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix -I../../fontlib/shared
 -fpic -march=pentium3 -ggdb -O0  -Werror   -c -o LinuxNativeFont.o LinuxNativeFont.c
> cc1: warnings being treated as errors
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_initializeFont':
> LinuxNativeFont.c:251: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:257: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:284: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:417: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:429: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:440: warning: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_initializeFontFromFP':
> LinuxNativeFont.c:487: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:493: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:508: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:520: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:592: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:604: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:615: warning: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getFonts':
> LinuxNativeFont.c:969: warning: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_NativeInitGlyphBitmap':
> LinuxNativeFont.c:1390: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:1399: warning: cast from pointer to integer of different size
> LinuxNativeFont.c:1409: warning: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getGlyphOutline':
> LinuxNativeFont.c:1636: warning: cast from pointer to integer of different size
> # dies with gcc 4.3.2
> $ gcc-4.3 -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT -D_REENTRANT -I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/include
-I/home/dacapo/regression/vms/scm/drlvm-svn/working_classlib/deploy/jdk/include -I. -I../shared/
-Icommon -I/usr/X11R6/include -I/usr/include/freetype2 -Iinclude -I../../fontlib/unix -I../../fontlib/shared
 -fpic -march=pentium3 -ggdb -O0  -Werror   -c -o LinuxNativeFont.o LinuxNativeFont.c
> cc1: warnings being treated as errors
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_initializeFont':
> LinuxNativeFont.c:251: error: cast from pointer to integer of different size
> LinuxNativeFont.c:257: error: cast from pointer to integer of different size
> LinuxNativeFont.c:284: error: cast from pointer to integer of different size
> LinuxNativeFont.c:417: error: cast from pointer to integer of different size
> LinuxNativeFont.c:429: error: cast from pointer to integer of different size
> LinuxNativeFont.c:440: error: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_initializeFontFromFP':
> LinuxNativeFont.c:487: error: cast from pointer to integer of different size
> LinuxNativeFont.c:493: error: cast from pointer to integer of different size
> LinuxNativeFont.c:508: error: cast from pointer to integer of different size
> LinuxNativeFont.c:520: error: cast from pointer to integer of different size
> LinuxNativeFont.c:592: error: cast from pointer to integer of different size
> LinuxNativeFont.c:604: error: cast from pointer to integer of different size
> LinuxNativeFont.c:615: error: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getFonts':
> LinuxNativeFont.c:969: error: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_NativeInitGlyphBitmap':
> LinuxNativeFont.c:1390: error: cast from pointer to integer of different size
> LinuxNativeFont.c:1399: error: cast from pointer to integer of different size
> LinuxNativeFont.c:1409: error: cast from pointer to integer of different size
> LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getGlyphOutline':
> LinuxNativeFont.c:1636: error: cast from pointer to integer of different size

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message