On 15 September 2011 at 10:47, Stefano Bridi wrote:
| Sorry... I sent the previous email by error while I was writing ;)
| 
| Without reingeneering all the build process I also think a check on
| uname -m could be sufficient.
| 
| if [ $(uname -m) == "x86_64" ]; then
|     CPPFLAGS="-DWL=64 -DFORTRANUNDERSCORE $CPPFLAGS";
| else
|     CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS";
| fi

Yes. I wonder, though, if we should go one further and create a program like 

   #include <stdio.h>
   int main(void) {
       printf("%u\n", (unsigned) sizeof(long));
   }

which prints 4 and 8, respectively, on my 32 and 64 bit systems. I may mod it
to print 

       printf("-DWL=%u\n", 8*(unsigned) sizeof(long));

and that would generate the appropriate switch, also catching other 64 bit
systems and not just the Intel CPU based ones.  

Or maybe test for sizeof==8 and then print 64, else print 32 as a fallback.

Dirk

| 
| Thanks
| Stefano
| 
| 
| On Thu, Sep 15, 2011 at 10:45 AM, Stefano Bridi <stefano.br...@gmail.com> 
wrote:
| > Without reingeneering all the build process I also think a check on
| > uname -m could be sufficient.
| >
| > if [ $(uname -m) == "x86_64" ]; then
| > CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS";
| > else
| > cho "64bit"; else echo "other";fi
| >
| >
| > On Wed, Sep 14, 2011 at 2:02 PM, Dirk Eddelbuettel <e...@debian.org> wrote:
| >>
| >> On 14 September 2011 at 12:33, Stefano Bridi wrote:
| >> | Package: pgapack
| >> | Version: 1.1.1-2
| >> | Severity: important
| >> |
| >> | Dear Maintainer,
| >> |
| >> | I was trying to compile the pgapack from source and I always got the 
embedded
| >> | test to fail. After some try and error i found that the parameter 
"-DWL=32" in
| >> | the configure/configure.in cause the first and last test to fail on my 
64bit pc
| >> | ("-DWL=64" seems to be fine).
| >> | So i tryied the packaged library and found that the problem is also here 
and so
| >> | this bug report:
| >> | In fact: using the test (instverf) in the pgapack package build against 
the
| >> | "libpgapack-serial1" package library I see the same behaviour:
| >> | Test 0 had 994 errors.
| >> | Test 1 was successful.
| >> | Test 2 was successful.
| >> | Test 3 was successful.
| >> | Test 4 had 989 errors.
| >> | With a rebuild from source of the same library with the "-DWL=64" I get
| >> | Test 0 was successful.
| >> | Test 1 was successful.
| >> | Test 2 was successful.
| >> | Test 3 was successful.
| >> | Test 4 was successful.
| >> |
| >> | I'm the system administrator and not the end user of this library and so 
I
| >> | don't know what is going on ...
| >>
| >> The sources are about 15 years old, and were unmaintained for many years
| >> until I adopted them.
| >>
| >> I have not changed the build process.  For Linux, it does an unconditional
| >>
| >>    linux)
| >>        SHELL="/bin/sh"
| >>        CC=cc
| >>        FC=f77
| >>        FFLAGS="-w"
| >>        LDFLAGS="-s $LDFLAGS"
| >>        CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS"
| >>        ;;
| >>
| >> We could add a simple word-length test here -- this is shell script code. 
Do
| >> you have a suggestion, besides maybe testing 'uname -m' for 'x86_64' and 
then
| >> setting -DWL=64 ?
| >>
| >> I don't really want to re-engineer the whole build system....
| >>
| >> Dirk
| >>
| >>
| >> | -- System Information:
| >> | Debian Release: wheezy/sid
| >> |   APT prefers unstable
| >> |   APT policy: (500, 'unstable'), (1, 'experimental')
| >> | Architecture: amd64 (x86_64)
| >> |
| >> | Kernel: Linux 3.0-3.dmz.2-liquorix-amd64 (SMP w/2 CPU cores; PREEMPT)
| >> | Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
| >> | Shell: /bin/sh linked to /bin/dash
| >> |
| >> | pgapack depends on no packages.
| >> |
| >> | pgapack recommends no packages.
| >> |
| >> | Versions of packages pgapack suggests:
| >> | ii  libpgapack-mpi1     1.1.1-2
| >> | ii  libpgapack-serial1  1.1.1-2
| >> |
| >> | -- no debconf information
| >> |
| >> |
| >>
| >> --
| >> New Rcpp master class for R and C++ integration is scheduled for
| >> San Francisco (Oct 8), more details / reg.info available at
| >> 
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php
| >>
| >

-- 
New Rcpp master class for R and C++ integration is scheduled for 
San Francisco (Oct 8), more details / reg.info available at
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to