harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: [drlvm][build] A build error using MS.Net2005
Date Tue, 11 Mar 2008 07:31:46 GMT
Any JIRA issue?

On Tue, Mar 11, 2008 at 5:33 AM, Simon Chow <simon.harmony@gmail.com> wrote:
> After some struggle, I have built harmony successfully using VS.net2005compiler.
>  The following modification should be performed both in the configuration
>  files and source files.
>  1, in working_classlib
>  depends\build\defines.mak
>  change
>     36  !ELSE
>     37  WARNING_LEVEL=WX
>     38  !ENDIF
>  to
>     36  !ELSE
>     37  WARNING_LEVEL=W3
>     38  !ENDIF
>
>  2, in working_vm
>    (1) make\vm\common-vm.xml
>         insert
>         <compilerarg value="/wd4005" if="is.msvc"/>
>         <compilerarg value="/wd4996" if="is.msvc" />
>         <compilerarg value="/wd4047" if="is.msvc" />
>         <compilerarg value="/wd4024" if="is.msvc" />
>         <compilerarg value="/wd4819" if="is.msvc" />
>         <compilerarg value="/wd4005" if="is.msvc"/>
>         after
>   62  <compilerarg value="/Zi" if="is.windows"/>
>   63  <compilerarg value="/W3" if="is.windows"/>
>   64  <compilerarg value="/WX" if="is.windows" unless="is.x86_64"/>
>
>    (2) working_vm\vm\include\open\hythread.h, hythread_ext.h
>  modify (take 'include' out of 'extern "C"')
>     #if defined(__cplusplus)
>     extern "C" {
>     #endif
>     #include <open/types.h>
>
>     #include <stddef.h>
>     #include "hycomp.h"
>
>     #ifdef _WIN32
>     #   if (_MSC_VER >= 1400)
>     #       include <intrin.h>
>     #   endif
>     #endif
>  to
>     #include <open/types.h>
>
>     #include <stddef.h>
>     #include "hycomp.h"
>
>     #ifdef _WIN32
>     #   if (_MSC_VER >= 1400)
>     #       include <intrin.h>
>     #   endif
>     #endif
>
>     #if defined(__cplusplus)
>     extern "C" {
>     #endif
>
>     For hythread_ext.h, similar operation should be performed.
>
>
>
>
>
>  On 06/03/2008, Aleksey Shipilev <aleksey.shipilev@gmail.com> wrote:
>  >
>
>
> > Hi,
>  >
>  > The problem here is warning that are treated as error, right. You can
>  > probably try to suppress these warnings by listing their codes in
>  > corresponding make/vm/*.xml. This is part of make/vm/jitrino.xml for
>  > ICL compiler warning suppression:
>  >
>  > ---- CUT ----
>  >                 <compilerarg value="/Qvec_report0" if="is.icl"
>  > unless="is.cfg.debug"/>
>  >                 <compilerarg
>  > value="/Qww1,82,111,172,181,279,280,373,424,593,654,858" if="is.icl"/>
>  >                 <compilerarg
>  >
>  > value="/Qwd82,193,271,304,373,383,424,444,654,869,981,1125,1418,1419,1572,1683"
>  > if="is.icl"/>
>  >                     <!--
>  >                       # /Qwd[tag,...] Disable the soft diagnostics
>  > that corresponds to tag.
>  >                       # /Qwr[tag,...] Override the severity of the
>  > soft diagnostics corresponding to tag and make it a remark.
>  >                       # /Qww[tag,...] Override the severity of the
>  > soft diagnostics corresponding to tag and make it a warning.
>  >                       # /Qwe[tag,...] Override the severity of the
>  > soft diagnostics corresponding to tag and make it an error.
>  > ---- CUT ----
>  >
>  > You may try to fix problem you describing in this way. Please report
>  > back if it work for you :)
>  >
>  > Thanks,
>  >
>  > Aleksey.
>  >
>  >
>  > On Thu, Mar 6, 2008 at 11:47 AM, liaoyin <ustcliao@gmail.com> wrote:
>  > > I think this website can explain these problem.
>  > >
>  > http://www.manticmoo.com/articles/jeff/programming/visual-c++/suppressing-deprecation-warnings.php
>  > >
>  > >   I suggest that you'd better use the  vc 2003.ok
>  > >
>  > >  Suppressing deprecation warnings when upgrading to Visual Studio 2005
>  > by
>  > >  Jeffrey P. Bigham
>  > >
>  > >  I was recently tasked with migrating a simple, internal application
>  > from
>  > >  VS2003 to VS2005. You would think this would be really simple, and it
>  > really
>  > >  wasn't that hard, but there are a few gotcha's that you have to watch
>  > out
>  > >  for when doing so.
>  > >
>  > >  In its infinite wisdom Microsoft decided that as of Visual Studio 2005,
>  > >  basically all of the standard C functions dealing with strings that
>  > rely on
>  > >  an ending NULL character and not a specified length would be
>  > deprecated.
>  > >  This means that strcpy, sprintf and strlen are all deprecated to name
>  > just a
>  > >  few. In some respects this is a good thing because it might help to
>  > convince
>  > >  programmers to use the more secure variations of these standard
>  > functions,
>  > >  but, unfortunately, it also causes applications that used to compile
>  > cleanly
>  > >  to issue thousands of warnings. Futhermore, switching to the more
>  > secure
>  > >  variations of the functions isn't always trivially because to use them
>  > you
>  > >  must know the length of the buffers, which might not be easily
>  > accessible in
>  > >  many programs not designed for it. And, not to mention, if you use the
>  > >  secure functions you give up all hope of being able to compile your C++
>  > code
>  > >  in Unix.
>  > >  Avoidance by Suppression
>  > >
>  > >  There may be a better way of getting rid of these warning, but until
>  > there
>  > >  is I'm just going to suppress them. I want to be as particular as
>  > possible
>  > >  with the warnings that I suppress to make sure that I'm not suppressing
>  > >  something useful. Therefore, I picked out the particular warning code
>  > >  associated with these warnings, code 4996, and suppress only warnings
>  > of
>  > >  that type.
>  > >
>  > >  To suppress these warnings simply add the following compiler directive:
>  > >
>  > >  /wd4996
>  > >
>  > >  to your commandline options.
>  > >
>  > >  In Visual Studio this can be found in the Properties of your project,
>  > under
>  > >  C/C++, in the Commandline option.
>  > >  List of newly deprecated functions in VS2005 and their secure
>  > alternative *
>  > >  Function**Secure Alternative* access_access, _access_s cabs_cabs
>  > cgets_cgets,
>  > >  _cgets_s chdir_chdir chmod_chmod chsize_chsize, _chsize_s close_close
>  > >  cprintf_cprintf, _cprintf_s cputs_cputs creat_creat cscanf_cscanf,
>  > _cscanf_s
>  > >  cwait_cwait dup_dup dup2_dup2 ecvt_ecvt, _ecvt_s eof_eof execl_execl
>  > execle
>  > >  _execle execlp_execlp execlpe_execlpe execv_execv execve_execve execvp
>  > >  _execvp execvpe_execvpe fcloseall_fcloseall fcvt_fcvt, _fcvt_s
>  > fdopen_fdopen
>  > >  fgetchar_fgetchar filelength_filelength fileno_fileno flushall_flushall
>  > >  fputchar_fputchar, _fputwchar gcvt_gcvt, _gcvt_s getch_getch
>  > getche_getche
>  > >  getcwd_getcwd, _wgetcwd getpid_getpid getw_getw hypot_hypot inp_inp
>  > inpw
>  > >  _inpw isascii__isascii isatty_isatty iscsym__iscsym iscsymf__iscsymf
>  > itoa_itoa,
>  > >  _itoa_s j0_j0 j1_j1 jn_jn kbhit_kbhit lfind_lfind, _lfind_s
>  > locking_locking
>  > >  lsearch_lsearch, _lsearch_s lseek_lseek ltoa_ltoa, _ltoa_s
>  > memccpy_memccpy
>  > >  memicmp_memicmp mkdir_mkdir mktemp_mktemp, _mktemp_s open_open
>  > outp_outp
>  > >  outpw_outpw putch_putch putenv_putenv, _putenv_s putw_putw read_read
>  > rmdir
>  > >  _rmdir rmtmp_rmtmp setmode_setmode sopen_sopen, _sopen_s spawnl_spawnl
>  > >  spawnle_spawnle spawnlp_spawnlp spawnlpe_spawnlpe spawnv_spawnv spawnve
>  > >  _spawnve spawnvp_spawnvp spawnvpe_spawnvpe strcmpi_stricmp
>  > strdup_strdup
>  > >  stricmp_stricmp strlwr_strlwr, _strlwr_s strnicmp_strnicmp
>  > strnset_strnset,
>  > >  _strnset_s strrev_strrev strset_strset, _strset_s strupr_strupr,
>  > _strupr_s
>  > >  swab_swab tell_tell tempnam_tempnam toascii__toascii tzset_tzset
>  > ultoa_ultoa,
>  > >  _ultoa_s umask_umask, _umask_s ungetch_ungetch unlink_unlink
>  > wcsdup_wcsdup
>  > >  wcsicmp_wcsicmp wcsicoll_wcsicoll wcslwr_wcslwr, _wcslwr_s
>  > wcsnicmp_wcsnicmp
>  > >  wcsnset_wcsnset, _wcsnset_s wcsrev_wcsrev wcsset_wcsset, _wcsset_s
>  > >  wcsupr_wcsupr,
>  > >  _wcsupr_s write_write y0_y0 y1_y1 yn_yn
>  > >
>  > >  2008/3/6, Simon Chow <simon.harmony@gmail.com>:
>  > >
>  > >
>  > > >
>  > >  > I want to build a svn latest version on Windows, but this error
>  > occurs.
>  > >  > How to deal with it?
>  > >  >
>  > >  > build:
>  > >  >      [echo] ## Building 'encoder'
>  > >  >     [mkdir] Created dir:
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\bui
>  > >  > ld\windows_x86_msvc_debug\semis\encoder\bin
>  > >  >     [mkdir] Created dir:
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\bui
>  > >  > ld\windows_x86_msvc_debug\semis\encoder\obj
>  > >  >
>  > >  >        [cc] 4 total files to be compiled.
>  > >  >        [cc] cl : Command line warning D9035 : option 'GZ' has been
>  > >  > deprecated an
>  > >  > d will be removed in a future release
>  > >  >        [cc] cl : Command line warning D9036 : use 'RTC1' instead of
>  > 'GZ'
>  > >  >        [cc] encoder.cpp
>  > >  >        [cc] enc_tabl.cpp
>  > >  >        [cc] enc_base.cpp
>  > >  >        [cc]
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\vm\port\src\enco
>  > >  > der\ia32_em64t\enc_base.cpp(771) : error C2220: warning treated as
>  > error -
>  > >  > no 'o
>  > >  > bject' file generated
>  > >  >        [cc]
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\vm\port\src\enco
>  > >  > der\ia32_em64t\enc_base.cpp(771) : warning C4996: 'strcmpi' was
>  > declared
>  > >  > depreca
>  > >  > ted
>  > >  >        [cc]         C:\Program Files\Microsoft Visual Studio
>  > >  > 8\VC\INCLUDE\string
>  > >  > .h(212) : see declaration of 'strcmpi'
>  > >  >        [cc]         Message: 'The POSIX name for this item is
>  > deprecated.
>  > >  > Instea
>  > >  > d, use the ISO C++ conformant name: _strcmpi. See online help for
>  > >  > details.'
>  > >  >        [cc]
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\vm\port\src\enco
>  > >  > der\ia32_em64t\enc_base.cpp(823) : warning C4996: 'strcmpi' was
>  > declared
>  > >  > depreca
>  > >  > ted
>  > >  >        [cc]         C:\Program Files\Microsoft Visual Studio
>  > >  > 8\VC\INCLUDE\string
>  > >  > .h(212) : see declaration of 'strcmpi'
>  > >  >        [cc]         Message: 'The POSIX name for this item is
>  > deprecated.
>  > >  > Instea
>  > >  > d, use the ISO C++ conformant name: _strcmpi. See online help for
>  > >  > details.'
>  > >  >        [cc]
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\vm\port\src\enco
>  > >  > der\ia32_em64t\enc_base.cpp(873) : warning C4996: 'strcmpi' was
>  > declared
>  > >  > depreca
>  > >  > ted
>  > >  >        [cc]         C:\Program Files\Microsoft Visual Studio
>  > >  > 8\VC\INCLUDE\string
>  > >  > .h(212) : see declaration of 'strcmpi'
>  > >  >        [cc]         Message: 'The POSIX name for this item is
>  > deprecated.
>  > >  > Instea
>  > >  > d, use the ISO C++ conformant name: _strcmpi. See online help for
>  > >  > details.'
>  > >  >        [cc]
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\vm\port\src\enco
>  > >  > der\ia32_em64t\enc_base.cpp(1073) : warning C4996: 'strcmpi' was
>  > declared
>  > >  > deprec
>  > >  > ated
>  > >  >        [cc]         C:\Program Files\Microsoft Visual Studio
>  > >  > 8\VC\INCLUDE\string
>  > >  > .h(212) : see declaration of 'strcmpi'
>  > >  >        [cc]         Message: 'The POSIX name for this item is
>  > deprecated.
>  > >  > Instea
>  > >  > d, use the ISO C++ conformant name: _strcmpi. See online help for
>  > >  > details.'
>  > >  >        [cc] dec_base.cpp
>  > >  >        [cc] Generating Code...
>  > >  >
>  > >  > BUILD FAILED
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\build.xml:121:
>  > The
>  > >  > following
>  > >  >   error occurred while executing this line:
>  > >  >
>  > >  >
>  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\make\vm\encoder.xml:32:
>  > >  > The
>  > >  > following error occurred while executing this line:
>  > >  > D:\Developing\JOpen64\Harmony\Code\trunk\working_vm\make\build-
>  > native.xml
>  > >  > :196:
>  > >  > c
>  > >  > l failed with return code 2
>  > >  >
>  > >  > Total time: 16 seconds
>  > >  >
>  > >  >
>  > >  > --
>  > >  > From : Simon.Chow@Software School of Fudan University
>  > >  >
>  > >
>  >
>
>
>
>  --
>
>
> From : Simon.Chow@Software School of Fudan University
>

Mime
View raw message