Menu

par2cmdline compile problem on centos 5

2007-05-14
2013-05-23
  • Nobody/Anonymous

    Hi, I am currently a happy user of par2cmdline and have been for some time both on fc1 and fc3, I am migrating to centos 5 and find this program invaluable but alas cannot get it to make on centos 5.

    configure appears to go fine

    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for g++... g++
    checking for C++ compiler default output file name... a.out
    checking whether the C++ compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking for style of include used by make... GNU
    checking dependency style of g++... gcc3
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking dependency style of gcc... gcc3
    checking for dirent.h that defines DIR... yes
    checking for library containing opendir... none required
    checking how to run the C preprocessor... gcc -E
    checking for egrep... grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for ANSI C header files... (cached) yes
    checking stdio.h usability... yes
    checking stdio.h presence... yes
    checking for stdio.h... yes
    checking endian.h usability... yes
    checking endian.h presence... yes
    checking for endian.h... yes
    checking getopt.h usability... yes
    checking getopt.h presence... yes
    checking for getopt.h... yes
    checking for size_t... yes
    checking whether byte ordering is bigendian... no
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... 64
    checking for _LARGE_FILES value needed for large files... no
    checking for _LARGEFILE_SOURCE value needed for large files... no
    checking for fseeko... yes
    checking for working memcmp... yes
    checking for stricmp... no
    checking for strcasecmp... yes
    checking for strchr... yes
    checking for memcpy... yes
    checking for getopt... yes
    checking for getopt_long... yes
    configure: creating ./config.status
    config.status: creating stamp-h
    config.status: creating Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands

    Make however fails thus

    make  all-am
    make[1]: Entering directory `/usr/local/src/par2cmdline-0.4'
    if g++ -DHAVE_CONFIG_H -I. -I. -I.    -Wall -g -O2 -MT reedsolomon.o -MD -MP -MF ".deps/reedsolomon.Tpo" -c -o reedsolomon.o reedsolomon.cpp; \         then mv -f ".deps/reedsolomon.Tpo" ".deps/reedsolomon.Po"; else rm -f ".deps/reedsolomon.Tpo"; exit 1; fi
    par2fileformat.h:67: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PACKET_HEADER::hash’
    par2fileformat.h:68: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PACKET_HEADER::setid’
    par2fileformat.h:79: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash FILEVERIFICATIONENTRY::hash’
    par2fileformat.h:84: warning: ignoring packed attribute because of unpacked non-POD field ‘PACKET_HEADER FILEVERIFICATIONPACKET::header’
    par2fileformat.h:86: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash FILEVERIFICATIONPACKET::fileid’
    par2fileformat.h:87: warning: ignoring packed attribute because of unpacked non-POD field ‘FILEVERIFICATIONENTRY FILEVERIFICATIONPACKET::entries [0u]’
    par2fileformat.h:99: warning: ignoring packed attribute because of unpacked non-POD field ‘PACKET_HEADER FILEDESCRIPTIONPACKET::header’
    par2fileformat.h:101: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash FILEDESCRIPTIONPACKET::fileid’
    par2fileformat.h:102: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash FILEDESCRIPTIONPACKET::hashfull’
    par2fileformat.h:103: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash FILEDESCRIPTIONPACKET::hash16k’
    par2fileformat.h:127: warning: ignoring packed attribute because of unpacked non-POD field ‘PACKET_HEADER MAINPACKET::header’
    par2fileformat.h:131: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash MAINPACKET::fileid [0u]’
    par2fileformat.h:141: warning: ignoring packed attribute because of unpacked non-POD field ‘PACKET_HEADER CREATORPACKET::header’
    par2fileformat.h:151: warning: ignoring packed attribute because of unpacked non-POD field ‘PACKET_HEADER RECOVERYBLOCKPACKET::header’
    par1fileformat.h:41: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PAR1FILEHEADER::controlhash’
    par1fileformat.h:42: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PAR1FILEHEADER::sethash’
    par1fileformat.h:56: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PAR1FILEENTRY::hashfull’
    par1fileformat.h:57: warning: ignoring packed attribute because of unpacked non-POD field ‘MD5Hash PAR1FILEENTRY::hash16k’
    reedsolomon.cpp:54: error: too few template-parameter-lists
    make[1]: *** [reedsolomon.o] Error 1
    make[1]: Leaving directory `/usr/local/src/par2cmdline-0.4'
    make: *** [all] Error 2

    libpar2-0.2 (related) is installed also, no problems there.

    As mentioned above, system is Centos 5 /rhel5

    SMP Mon Apr 30 19:55:44 EDT 2007 i686 i686 i386 GNU/Linux

    gcc -v
    Using built-in specs.
    Target: i386-redhat-linux
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
    Thread model: posix
    gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)

    Line 54 of reedsolomon.cpp onward looks like

    bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
    {
      inputcount = (u32)present.size();

      datapresentindex = new u32[inputcount];
      datamissingindex = new u32[inputcount];
      database         = new G::ValueType[inputcount];

      G::ValueType base = 1;

      for (unsigned int index=0; index<inputcount; index++)
      {
        // Record the index of the file in the datapresentindex array
        // or the datamissingindex array
        if (present[index])
        {
          datapresentindex[datapresent++] = index;
        }
        else
        {
          datamissingindex[datamissing++] = index;
        }

        database[index] = base++;
      }

      return true;
    }

    Web searches on "too few template-parameter-lists", suggest this is a gcc bug (possibly, allegedly).

    This program par2cmdline hasn't been updated for some time and is useful enough to be necessitous on later distros, any chance of an updated package or work-around in the offing.

    I will now browse the previous posts and find if anyone else has related problems, probably should have done that first though.

     
    • Nobody/Anonymous

      OP posting back

      This has been fixed using the method described in other posts for fc4/5.
      changing

      bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)

      to

      template <>
      bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)

      or similar, where required in reedsolomon.cpp has done the trick.

      Thanks for a handy bit of software with good support, it lives again.

       
      • draeath

        draeath - 2007-11-18

        Perhaps that should be submitted as a patch?

        What exactly does that DO? Such a simple change...

         
      • Nobody/Anonymous

        Here is a diff that can be applied to reedsolomon.cpp in par2cmdline to fix this problem.  Cut and paste this into a file, say fix.diff.  Then run patch < fix.diff in the directory with reedsolomon.cpp.
        Does not fix the packed warnings, but the utility seems to work fine.

        --- ../par2cmdline-0.4/reedsolomon.cpp    2003-05-26 11:01:31.000000000 -0700
        +++ reedsolomon.cpp    2008-12-02 16:28:46.969415660 -0700
        @@ -50,7 +50,8 @@ u32 gcd(u32 a, u32 b)
             return 0;
           }
        }
        -

        +template <>
        bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
        {
           inputcount = (u32)present.size();
        @@ -80,6 +81,7 @@ bool ReedSolomon<Galois8>::SetInput(cons
           return true;
        }

        +template <>
        bool ReedSolomon<Galois8>::SetInput(u32 count)
        {
           inputcount = count;
        @@ -101,6 +103,7 @@ bool ReedSolomon<Galois8>::SetInput(u32
           return true;
        }

        +template <>
        bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
        {
           // Look up the appropriate element in the RS matrix
        @@ -189,6 +192,7 @@ bool ReedSolomon<Galois8>::Process(size_

        // Set which of the source files are present and which are missing
        // and compute the base values to use for the vandermonde matrix.
        +template <>
        bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
        {
           inputcount = (u32)present.size();
        @@ -233,6 +237,7 @@ bool ReedSolomon<Galois16>::SetInput(con

        // Record that the specified number of source files are all present
        // and compute the base values to use for the vandermonde matrix.
        +template <>
        bool ReedSolomon<Galois16>::SetInput(u32 count)
        {
           inputcount = count;
        @@ -267,6 +272,7 @@ bool ReedSolomon<Galois16>::SetInput(u32
           return true;
        }

        +template <>
        bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
        {
           // Look up the appropriate element in the RS matrix

         

Log in to post a comment.