Re: [Mingw-w64-public] trouble building gmp 4.3.2 in cygwin

2010-04-14 Thread Martin Rubey
Ozkan Sezer seze...@gmail.com writes:

many thanks for the patch.  The gmp configures fine now.  Unfortunately,
I'm still having trouble configuring ecl.

The config.log is at

http://sprunge.us/SWHX

the relevant bit is the very end, I think:

configure:8035: checking size of long long
configure:8085: error: in `/home/Mari/ecl-10.3.1-x64/build':
configure:8088: error: cannot run test program while cross compiling
See `config.log' for more details.

The relevant bit of ecl's configure is (hopefully) below...

Thanks again,

Martin


{ $as_echo $as_me:$LINENO: checking size of long long 5
$as_echo_n checking size of long long...  6; }
if test $GCC = yes; then
  ac_cv_c_long_long=yes
else
  cat conftest.$ac_ext _ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h conftest.$ac_ext
cat conftest.$ac_ext _ACEOF
/* end confdefs.h.  */

int
main ()
{
long long int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try=$ac_compile
case (($ac_try in
  *\* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo=\\$as_me:$LINENO: $ac_try_echo\
$as_echo $ac_try_echo) 5
  (eval $ac_compile) 2conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 conftest.err
  rm -f conftest.er1
  cat conftest.err 5
  $as_echo $as_me:$LINENO: \$? = $ac_status 5
  (exit $ac_status); }  {
 test -z $ac_c_werror_flag ||
 test ! -s conftest.err
   }  test -s conftest.$ac_objext; then
  ac_cv_c_long_long=yes
else
  $as_echo $as_me: failed program was: 5
sed 's/^/| /' conftest.$ac_ext 5

ac_cv_c_long_long=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $ac_cv_c_long_long = yes; then
  if test $cross_compiling = yes; then
  { { $as_echo $as_me:$LINENO: error: in \`$ac_pwd': 5
$as_echo $as_me: error: in \`$ac_pwd': 2;}
{ { $as_echo $as_me:$LINENO: error: cannot run test program while cross
compili
ng
See \`config.log' for more details. 5
$as_echo $as_me: error: cannot run test program while cross compiling
See \`config.log' for more details. 2;}
   { (exit 1); exit 1; }; }; }
else

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] trouble building gmp 4.3.2 in cygwin

2010-04-14 Thread Ozkan Sezer
On Wed, Apr 14, 2010 at 10:37 AM, Martin Rubey
martin.ru...@math.uni-hannover.de wrote:
 Ozkan Sezer seze...@gmail.com writes:

 many thanks for the patch.  The gmp configures fine now.  Unfortunately,
 I'm still having trouble configuring ecl.

 The config.log is at

 http://sprunge.us/SWHX

 the relevant bit is the very end, I think:

 configure:8035: checking size of long long
 configure:8085: error: in `/home/Mari/ecl-10.3.1-x64/build':
 configure:8088: error: cannot run test program while cross compiling
 See `config.log' for more details.


I am not familiar with ecl, nor with its configury,
although the problem seems to be with its configury
itself. Checking for a size with knowledge that it
cannot while cross-compiling should be an oversight
in that software's configuration system. Updating it
to use newer autoconf would help, I guess, but
other developers here may have more to say on
that.

 The relevant bit of ecl's configure is (hopefully) below...

 Thanks again,

 Martin


 { $as_echo $as_me:$LINENO: checking size of long long 5
 $as_echo_n checking size of long long...  6; }
 if test $GCC = yes; then
  ac_cv_c_long_long=yes
 else
  cat conftest.$ac_ext _ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h conftest.$ac_ext
 cat conftest.$ac_ext _ACEOF
 /* end confdefs.h.  */

 int
 main ()
 {
 long long int i;
  ;
  return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try=$ac_compile
 case (($ac_try in
  *\* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo=\\$as_me:$LINENO: $ac_try_echo\
 $as_echo $ac_try_echo) 5
  (eval $ac_compile) 2conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 conftest.err
  rm -f conftest.er1
  cat conftest.err 5
  $as_echo $as_me:$LINENO: \$? = $ac_status 5
  (exit $ac_status); }  {
         test -z $ac_c_werror_flag ||
         test ! -s conftest.err
       }  test -s conftest.$ac_objext; then
  ac_cv_c_long_long=yes
 else
  $as_echo $as_me: failed program was: 5
 sed 's/^/| /' conftest.$ac_ext 5

        ac_cv_c_long_long=no
 fi

 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 if test $ac_cv_c_long_long = yes; then
  if test $cross_compiling = yes; then
  { { $as_echo $as_me:$LINENO: error: in \`$ac_pwd': 5
 $as_echo $as_me: error: in \`$ac_pwd': 2;}
 { { $as_echo $as_me:$LINENO: error: cannot run test program while cross
 compili
 ng
 See \`config.log' for more details. 5
 $as_echo $as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details. 2;}
   { (exit 1); exit 1; }; }; }
 else


--
Ozkan

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [Mingw-users] Error message from assembler with mingw-w64-1.0-bin_i686-mingw_20100405

2010-04-14 Thread Doug Semler
2010/4/13 Doug Semler dougsem...@gmail.com:
 I have to run but I quickly looked at it and it looks like there may
 be an parentheses around %1 in InterlockedIncrement64 and
 InterlockedDecrement16 inline declarations in winnt.h which are being
 expanded to ((%rcx)) in the assembly (which is incorrect).


Yes, this is the issue.  The following code exposes it completely
(without the variation in command line parameters):

#include windows.h

int main()
{
LONG64 bar = 41;
LONG64 foo = InterlockedIncrement64(bar);
return (int) foo;
}

prompt gcc -c -m64 -O2 foo.c -save-temps
foo.s: Assembler messages:
foo.s:15: Error: missing ')'
foo.s:15: Error: junk `(%rsp))' after expression

Offending line of foo.s:

lock
xaddq %rax,(40(%rsp))
 # 0  2
/NO_APP
movl40(%rsp), %eax

Note the extra parenthesis around the dest register location of the
xaddq instruction.

The following patch fixes this for both InterlockedIncrement64 and
InterlockedDecrement16:

mingw-w64-headers/include/ChangeLog:
* winnt.h (inline InterlockedDecrement16, InterlockedIncrement64):
  Remove parentheses from destination regsiter

diff --git i/mingw-w64-headers/include/winnt.h
w/mingw-w64-headers/include/winnt.h
index 2c0be70..8a336bc 100644
--- i/mingw-w64-headers/include/winnt.h
+++ w/mingw-w64-headers/include/winnt.h
@@ -1259,7 +1259,7 @@ typedef DWORD LCID;
 __CRT_INLINE SHORT InterlockedDecrement16(SHORT volatile *Addend) {
   SHORT ret = -1;
   __asm__ __volatile__(lock\n\t
-  xaddw %0,(%1)
+  xaddw %0,%1
   : +r (ret), +m (*Addend)
   : : memory);
   return ret - 1;
@@ -1345,7 +1345,7 @@ typedef DWORD LCID;
 __CRT_INLINE LONG64 InterlockedIncrement64(LONG64 volatile *Addend) {
   LONG64 ret = 1LL;
   __asm__ __volatile__ (lock\n\t
-  xaddq %0,(%1)
+  xaddq %0,%1
   : +r (ret), +m (*Addend)
   : : memory);
   return ret + 1LL;

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [Mingw-users] Error message from assembler with mingw-w64-1.0-bin_i686-mingw_20100405

2010-04-14 Thread Hervé Pagès
Thanks Kai and Doug for the prompt fix! Otherwise samtools compiles
and seems to work fine on 64-bit Windows. Thanks for the great
toolchain!

H.

Kai Tietz wrote:
 2010/4/14 Doug Semler dougsem...@gmail.com:
 2010/4/13 Doug Semler dougsem...@gmail.com:
 I have to run but I quickly looked at it and it looks like there may
 be an parentheses around %1 in InterlockedIncrement64 and
 InterlockedDecrement16 inline declarations in winnt.h which are being
 expanded to ((%rcx)) in the assembly (which is incorrect).

 Yes, this is the issue.  The following code exposes it completely
 (without the variation in command line parameters):

 #include windows.h

 int main()
 {
LONG64 bar = 41;
LONG64 foo = InterlockedIncrement64(bar);
return (int) foo;
 }

 prompt gcc -c -m64 -O2 foo.c -save-temps
 foo.s: Assembler messages:
 foo.s:15: Error: missing ')'
 foo.s:15: Error: junk `(%rsp))' after expression

 Offending line of foo.s:

lock
xaddq %rax,(40(%rsp))
  # 0  2
 /NO_APP
movl40(%rsp), %eax

 Note the extra parenthesis around the dest register location of the
 xaddq instruction.

 The following patch fixes this for both InterlockedIncrement64 and
 InterlockedDecrement16:

 mingw-w64-headers/include/ChangeLog:
* winnt.h (inline InterlockedDecrement16, InterlockedIncrement64):
  Remove parentheses from destination regsiter

 diff --git i/mingw-w64-headers/include/winnt.h
 w/mingw-w64-headers/include/winnt.h
 index 2c0be70..8a336bc 100644
 --- i/mingw-w64-headers/include/winnt.h
 +++ w/mingw-w64-headers/include/winnt.h
 @@ -1259,7 +1259,7 @@ typedef DWORD LCID;
 __CRT_INLINE SHORT InterlockedDecrement16(SHORT volatile *Addend) {
   SHORT ret = -1;
   __asm__ __volatile__(lock\n\t
 -  xaddw %0,(%1)
 +  xaddw %0,%1
   : +r (ret), +m (*Addend)
   : : memory);
   return ret - 1;
 @@ -1345,7 +1345,7 @@ typedef DWORD LCID;
 __CRT_INLINE LONG64 InterlockedIncrement64(LONG64 volatile *Addend) {
   LONG64 ret = 1LL;
   __asm__ __volatile__ (lock\n\t
 -  xaddq %0,(%1)
 +  xaddq %0,%1
   : +r (ret), +m (*Addend)
   : : memory);
   return ret + 1LL;

 
 Yeah, thanks. Committed your changes at rev 2213 to trunk.
 
 Cheers,
 Kai
 

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public