Posts Tagged ‘par2’

installing par2 par2cmdline on fedora core 4

Wednesday, December 20th, 2006

This is a great linux command line application that lets you repair creat etc par2 file.

Background: If you make massive downloads online a lot of your data can be missing. PAR2 is a
way of creating .. let’s call them.. ’semi backup files’ for those of us with lesser intelligence. (me).

You maye have seen downloads for things like movies on usenet, and some of the files are all screwy. But
still you see people saying things like ‘just par2 the suckers..’ and you scratch your head and .. anyway.

If you got here you probably know what par2 is and you are having PROBLEMS COMPILING on a 64bit machine!
this is that it may look like:

reedsolomon.cpp:54: error: explicit specialization of ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::SetInput(const std::vector<bool, std::allocator<bool> >&)’ must be introduced by ‘template <>’
reedsolomon.cpp:54: error: template-id ‘SetInput<>’ for ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::SetInput(const std::vector<bool, std::allocator<bool> >&)’ does not match any template declaration
reedsolomon.cpp:54: error: invalid function declaration
reedsolomon.cpp:83: error: explicit specialization of ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::SetInput(u32)’ must be introduced by ‘template <>’
reedsolomon.cpp:83: error: template-id ‘SetInput<>’ for ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::SetInput(u32)’ does not match any template declaration
reedsolomon.cpp:83: error: invalid function declaration
reedsolomon.cpp:104: error: explicit specialization of ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::Process(size_t, u32, const void*, u32, void*)’ must be introduced by ‘template <>’
reedsolomon.cpp:104: error: template-id ‘Process<>’ for ‘bool ReedSolomon<Galois<8u, 285u, unsigned char> >::Process(size_t, u32, const void*, u32, void*)’ does not match any template declaration
reedsolomon.cpp:104: error: invalid function declaration
reedsolomon.cpp:192: error: explicit specialization of ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::SetInput(const std::vector<bool, std::allocator<bool> >&)’ must be introduced by ‘template <>’
reedsolomon.cpp:192: error: template-id ‘SetInput<>’ for ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::SetInput(const std::vector<bool, std::allocator<bool> >&)’ does not match any template declaration
reedsolomon.cpp:192: error: invalid function declaration
reedsolomon.cpp:236: error: explicit specialization of ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::SetInput(u32)’ must be introduced by ‘template <>’
reedsolomon.cpp:236: error: template-id ‘SetInput<>’ for ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::SetInput(u32)’ does not match any template declaration
reedsolomon.cpp:236: error: invalid function declaration
reedsolomon.cpp:270: error: explicit specialization of ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::Process(size_t, u32, const void*, u32, void*)’ must be introduced by ‘template <>’
reedsolomon.cpp:270: error: template-id ‘Process<>’ for ‘bool ReedSolomon<Galois<16u, 69643u, short unsigned int> >::Process(size_t, u32, const void*, u32, void*)’ does not match any template declaration
reedsolomon.cpp:270: error: invalid function declaration
make[1]: *** [reedsolomon.o] Error 1
make[1]: Leaving directory `/tmp/par2cmdline-0.4'
make: *** [all] Error 2

The problem is the file reedsolomon.cpp , it’s got a problem when you try to compile with gcc 4.0

Open up the magic tool and cure for all the problems in the univers: vim , and edit reedsolomon.cpp
Run this command (after pressing ‘Esc’ and ‘:’ (which puts you in command mode ))

:%s/^bool ReedSolomon/template <> bool ReedSolomon/g

save the file, run make again and it should compile