You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Steve Blackburn (JIRA)" <ji...@apache.org> on 2008/07/17 04:29:31 UTC

[jira] Created: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

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


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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618265#action_12618265 ] 

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


  Should I or others check, test and commit the patches, which include modified data convertion for different parts? If no objection I will try to commit them several hours later.

 Thanks,
Chunrong

> 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.patch, H5914.fixed-more-warnings.patch
>
>
> 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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-5914:
----------------------------------

    Attachment: More64bits.warnings.txt


  More data convertion related issues are observed as the attachment. I wonder if they will potentially break some future compiler if the warning level is high.
 Below are some examples:

     [java]      [exec] win_printer_factory.c(86) : warning C4312: 'type cast' :
 conversion from 'unsigned long' to 'HANDLE' of greater size
     [java]      [exec] devmode_struct_wrapper.c(149) : warning C4312: 'type cas
t' : conversion from 'unsigned long' to 'DEVMODEW *' of greater size
     [java]        [cc] C:\pt-hdk\chunrong.release.680641.1\working_vm\vm\thread
\src\thread_native_state.c(38) : warning C4244: 'return' : conversion from 'IDAT
A' to 'int', possible loss of data
     [java] [compile-cc] C:\pt-hdk\chunrong.release.680641.1\working_vm\vm\vmcor
e\src\ncai\ncai_registers.cpp(28) : warning C4267: '=' : conversion from 'size_t
' to 'jint', possible loss of data
     [java] [compile-cc] C:\pt-hdk\chunrong.release.680641.1\working_vm\vm\jitri
no\src\vm\VMInterface.cpp(717) : warning C4267: 'return' : conversion from 'size
_t' to 'U_32', possible loss of data
     [java] [compile-cc] c:\pt-hdk\chunrong.release.680641.1\working_vm\vm\gc_ge
n\src\mark_sweep\wspace_chunk.h(158) : warning C4244: 'argument' : conversion from 'uint64' to 'int', possible loss of data
     [java] [compile-cc] C:\pt-hdk\chunrong.release.680641.1\working_vm\vm\gc_ge
n\src\los\lspace_alloc_collect.cpp(412) : warning C4244: 'argument' : conversion
 from 'uint64' to 'unsigned int', possible loss of data


> 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.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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618699#action_12618699 ] 

Mark Hindess commented on HARMONY-5914:
---------------------------------------

The linux font code was failing for me after the commit for this jira so I made some minor modifications at r681381.


> 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.


[jira] Updated: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-5914:
----------------------------------

    Attachment: H5914.classlib.patch


  Here I prepared a patch for the compilation warnings which include the pointer casting and the signedness issues. If no objection I'd like to commit the patch.
   I also noted quite a few warnings from DRLVM building as "warning: deprecated conversion from string constant to 'char*'" although they do not break the building so far. Maybe we also need to fix them.

> 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
>         Attachments: H5914.classlib.patch
>
>
> 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.


[jira] Updated: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-5914:
----------------------------------

    Attachment: H5914.classlib.new.patch


 Update the patch for classlib files and grant license to ASF.

> 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.


[jira] Updated: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-5914:
----------------------------------

    Attachment: H5914.64bitswarnings.patch


 Updated H5914.fixed-more-warnings.patch to H5914.64bitswarnings.patch for one new issue introduced by the new commit.

> 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.patch, H5914.fixed-more-warnings.patch
>
>
> 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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "chunrong lai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614296#action_12614296 ] 

chunrong lai commented on HARMONY-5914:
---------------------------------------


  I see the modification for working_classlib/depends/build/defines.mk  is committed in r674240 when July 6th.
  I also see more similar errors if rebuild Harmony after an "ant clean" (unfortunately the integrity testing cycle did not do "ant clean" so far). 
  I'd like to examine the codes to enable the -Werror. Also I think it may be acceptable to temporarily disable the -Werror to build the harmony. 

     [exec] cc -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/ -DHYPORT_LIBRARY_DEFINE -Ilinux.x86 -fpic -march=pentium3 -ggdb -O0  -Werror   -c -o hyfiletext.o hyfiletext.c
     [exec] cc1: warnings being treated as errors
     [exec] hyfiletext.c: In function 'translateUTF8String':
     [exec] hyfiletext.c:295: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
     [exec] hyfiletext.c: In function 'file_write_using_wctomb':
     [exec] hyfiletext.c:334: warning: pointer targets in passing argument 1 of 'translateUTF8String' differ in signedness
     [exec] hyfiletext.c:334: warning: pointer targets in passing argument 2 of 'translateUTF8String' differ in signedness
     [exec] hyfiletext.c: In function 'buf_write_using_wctomb':
     [exec] hyfiletext.c:364: warning: pointer targets in passing argument 1 of 'translateUTF8String' differ in signedness
     [exec] hyfiletext.c:364: warning: pointer targets in passing argument 2 of 'translateUTF8String' differ in signedness
     [exec] make: *** [hyfiletext.o] Error 1

      [exec] cc -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    -c -o LinuxNativeFont.o LinuxNativeFont.c
     [exec] LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getFontFamiliesNames':
     [exec] LinuxNativeFont.c:129: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
     [exec] LinuxNativeFont.c:132: warning: pointer targets in passing argument 2 of 'strncpy' differ in signedness
     [exec] LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_embedFontNative':
     [exec] LinuxNativeFont.c:192: warning: pointer targets in passing argument 2 of 'FcConfigAppFontAddFile' differ in signedness
     [exec] LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_initializeFont':
     [exec] LinuxNativeFont.c:303: warning: pointer targets in passing argument 3 of '(*env)->ReleaseStringUTFChars' differ in signedness
     [exec] LinuxNativeFont.c:316: warning: pointer targets in passing argument 3 of '(*env)->ReleaseStringUTFChars' differ in signedness
     [exec] LinuxNativeFont.c:325: warning: pointer targets in passing argument 3 of '(*env)->ReleaseStringUTFChars' differ in signedness
     [exec] LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_getFonts':
     [exec] LinuxNativeFont.c:941: warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness
     [exec] LinuxNativeFont.c:948: warning: pointer targets in passing argument 2 of 'strncpy' differ in signedness
     [exec] LinuxNativeFont.c: In function 'Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_RemoveFontResource':
     [exec] LinuxNativeFont.c:1351: warning: pointer targets in passing argument 3 of '(*env)->ReleaseStringUTFChars' differ in signedness

> 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
>
> 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.


[jira] Assigned: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai reassigned HARMONY-5914:
-------------------------------------

    Assignee: Chunrong Lai

> 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.classlib.patch, H5914.fixed-more-warnings.patch
>
>
> 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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617770#action_12617770 ] 

Mark Hindess commented on HARMONY-5914:
---------------------------------------

The title is somewhat misleading since I tested the classlib code with:

  gcc version 4.3.1 (Debian 4.3.1-2) 

when I committed the -Werror change and it compiled without problems.

I think it is a good idea to keep -Werror switched on.  I've just been trying to fix some issues with drlvm/jitrino that prevent compilation on g++ 4.3 and at least one of the warnings seemed to me to be a real bug - see r680650 at http://svn.apache.org/viewvc?view=rev&revision=680650

I mentioned the "deprecated conversion" warnings on the dev list some time ago.  I think we should fix these since the code using string constants should be using them in a 'const char*' context so it makes sense for the code to enforce this constraint.


> 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.classlib.patch, H5914.fixed-more-warnings.patch
>
>
> 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.


[jira] Updated: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chunrong Lai updated HARMONY-5914:
----------------------------------

    Attachment: H5914.fixed-more-warnings.patch


 More warnings are found in 64bits platforms.

> 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
>         Attachments: H5914.classlib.patch, H5914.fixed-more-warnings.patch
>
>
> 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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Steve Blackburn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618558#action_12618558 ] 

Steve Blackburn commented on HARMONY-5914:
------------------------------------------

Just FYI, our nightly regressions can be found here.   At this stage DRLVM is the only VM missing.

http://dacapo.anu.edu.au/regression/perf/head.html
http://dacapo.anu.edu.au/regression/perf/2006-10-MR2.html


> 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.


[jira] Commented: (HARMONY-5914) Can't build with gcc >= 4.2: LinuxNativeFont.c:251: warning: cast from pointer to integer of different size

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614289#action_12614289 ] 

Senaka Fernando commented on HARMONY-5914:
------------------------------------------

Hi all,

I ran into exactly the same issue. In my system, I have set the -Werror flag by default. However, since April 2008, I was not able to build Harmony with this flag. This is justifiable, as all the warnings may not make sense. And, under valid reasons you may go ahead with a warning. But, when I last built Harmony, yesterday morning, my build failed. At exactly the same point. I then grepped for all occurrences of -Werror and then removed them and rebuilt. Then I managed to successfully build Harmony. I have two questions here.

1. Normally, is it the practice to leave -Werror flags intact in a build system? There might be users who are not much familiar with C compiling who will not understand such a failure.

2. If the -Werror flag was added on purpose, I believe that something is not coded as expected.

Here is a svn diff that would help.

Index: working_vm/make/vm/jitrino.xml
===================================================================
--- working_vm/make/vm/jitrino.xml      (revision 676990)
+++ working_vm/make/vm/jitrino.xml      (working copy)
@@ -184,7 +184,6 @@
             <compiler id="plaf.cpp.compiler" extends="common.cpp.compiler">
                 <compilerarg value="-fmessage-length=0" if="is.gcc"/>
                 <compilerarg value="-Wall" if="is.gcc"/>
-                <compilerarg value="-Werror" if="is.gcc"/>

                 <compilerarg value="-x" />
                 <compilerarg value="c++" />
Index: working_classlib/depends/build/defines.mk
===================================================================
--- working_classlib/depends/build/defines.mk   (revision 676990)
+++ working_classlib/depends/build/defines.mk   (working copy)
@@ -34,7 +34,7 @@
 EXERPATHPREFIX = -Xlinker -z -Xlinker origin -Xlinker -rpath \
        -Xlinker \$$ORIGIN/ -Xlinker -rpath-link \
        -Xlinker
-WARNFLAGS=-Werror
+WARNFLAGS=

 include $(HY_HDK)/build/make/platform/$(HY_PLATFORM).mk

Regards,
Senaka

> 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
>
> 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.