fcorbelli / zpaqfranz

Deduplicating archiver with encryption and paranoid-level tests. Swiss army knife for the serious backup and disaster recovery manager. Ransomware neutralizer. Win/Linux/Unix
MIT License
278 stars 25 forks source link

55.3 on Ubuntu (gcc version 9.4.0) #23

Closed forgottenbutnotgone closed 2 years ago

forgottenbutnotgone commented 2 years ago

g++ -Dunix -O3 -march=native zpaqfranz.cpp -o zpaqfranz -pthread zpaqfranz.cpp: In function ‘std::string makelongpath(std::string)’: zpaqfranz.cpp:20379:9: error: ‘i_string’ was not declared in this scope 20379 | return i_string; | ^~~~ zpaqfranz.cpp:20382:6: error: ‘flaglongpath’ was not declared in this scope; did you mean ‘makelongpath’? 20382 | if (flaglongpath) | ^~~~ | makelongpath make: *** [Makefile:10: zpaqfranz] Error 1

fcorbelli commented 2 years ago

My fault Thank you

fcorbelli commented 2 years ago

55_4a.zip Please check the attached pre-prelease and report if OK

fcorbelli commented 2 years ago

The function should be

string makelongpath(string i_path)
{
#ifdef _WIN32
    if (flaglongpath)
        if (iswindowspath(i_path))
            if (!islongpath(i_path))
                return "//?/"+i_path;
#endif
    return i_path;
}
forgottenbutnotgone commented 2 years ago

Compiles without issue. Thanks.

dertuxmalwieder commented 2 years ago

Confirmed with OpenBSD, by the way (still trying to port...)

$ make fake
===>  Building for zpaqfranz-55.3
c++ -Dunix -O2 -pipe   zpaqfranz.cpp -o zpaqfranz -pthread
zpaqfranz.cpp:20379:9: error: use of undeclared identifier 'i_string'; did you mean 'isprint'?
        return i_string;
               ^~~~~~~~
               isprint
/usr/include/ctype.h:74:5: note: 'isprint' declared here
int     isprint(int);
        ^
zpaqfranz.cpp:20379:9: error: no viable conversion from returned value of type 'int (int)' to function return type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>')
        return i_string;
               ^~~~~~~~
/usr/include/c++/v1/string:819:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'const std::string &' for 1st argument
    basic_string(const basic_string& __str);
    ^
/usr/include/c++/v1/string:824:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'std::string &&' for 1st argument
    basic_string(basic_string&& __str)
    ^
/usr/include/c++/v1/string:837:5: note: candidate constructor template not viable: no known conversion from 'int (int)' to 'const char *' for 1st argument
    basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
    ^
/usr/include/c++/v1/string:892:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'initializer_list<char>' for 1st argument
    basic_string(initializer_list<_CharT> __il);
    ^
/usr/include/c++/v1/string:812:40: note: explicit constructor is not a candidate
    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                       ^
/usr/include/c++/v1/string:878:18: note: explicit constructor is not a candidate
        explicit basic_string(const _Tp& __t);
                 ^
zpaqfranz.cpp:20382:6: error: use of undeclared identifier 'flaglongpath'
        if (flaglongpath)
            ^
3 errors generated.
*** Error 1 in /usr/local/pobj/zpaqfranz-55.3/zpaqfranz-55.3 (Makefile:10 'zpaqfranz')
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2967 '/usr/local/pobj/zpaqfranz-55.3/.build_done': @cd /usr/local/pobj/zpaqfranz-...)
*** Error 2 in /usr/ports/archivers/zpaqfranz (/usr/ports/infrastructure/mk/bsd.port.mk:2607 'fake': @lock=zpaqfranz-55.3;  export _LOCKS_HE...)

As i_string is affected as well, it might or might not be that 55.4a fixes it ... I'll try later.

fcorbelli commented 2 years ago

https://github.com/fcorbelli/zpaqfranz/issues/23

A small fix (f+up copy and paste by... Notepad :) I am almost ready with the next "big thing", aka Windows backup of (almost, not all) C: drive by VSS support and longfilenames

Can make a backup (a new version) in about a couple of minutes Therefore I will fix in the next release

fcorbelli commented 2 years ago

https://github.com/fcorbelli/zpaqfranz/releases/tag/55.4

dertuxmalwieder commented 2 years ago

because Windows does not like

🤣

dertuxmalwieder commented 2 years ago

Well...

>> (SHA256) zpaqfranz-55.4.tar.gz: OK
===>  Verifying specs:  c++ c++abi pthread c m
===>  found c++.9.0 c++abi.6.0 pthread.26.1 c.96.1 m.10.1
===>  Extracting for zpaqfranz-55.4
===>  Patching for zpaqfranz-55.4
===>  Compiler link: clang -> /usr/bin/clang
===>  Compiler link: clang++ -> /usr/bin/clang++
===>  Compiler link: cc -> /usr/bin/cc
===>  Compiler link: c++ -> /usr/bin/c++
===>  Generating configure for zpaqfranz-55.4
===>  Configuring for zpaqfranz-55.4
===>  Building for zpaqfranz-55.4
c++ -Dunix -O2 -pipe   zpaqfranz.cpp -o zpaqfranz -pthread
zpaqfranz.cpp:20379:9: error: use of undeclared identifier 'i_string'; did you mean 'isprint'?
        return i_string;
               ^~~~~~~~
               isprint
/usr/include/ctype.h:74:5: note: 'isprint' declared here
int     isprint(int);
        ^
zpaqfranz.cpp:20379:9: error: no viable conversion from returned value of type 'int (int)' to function return type 'std::string' (aka 'basic_string<char, char_traits<char>, allocat
or<char>>')
        return i_string;
               ^~~~~~~~
/usr/include/c++/v1/string:819:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'const std::string &' for 1st argument
    basic_string(const basic_string& __str);
    ^
/usr/include/c++/v1/string:824:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'std::string &&' for 1st argument
    basic_string(basic_string&& __str)
    ^
/usr/include/c++/v1/string:837:5: note: candidate constructor template not viable: no known conversion from 'int (int)' to 'const char *' for 1st argument
    basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
    ^
/usr/include/c++/v1/string:892:5: note: candidate constructor not viable: no known conversion from 'int (int)' to 'initializer_list<char>' for 1st argument
    basic_string(initializer_list<_CharT> __il);
    ^
/usr/include/c++/v1/string:812:40: note: explicit constructor is not a candidate
    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                       ^
/usr/include/c++/v1/string:878:18: note: explicit constructor is not a candidate
        explicit basic_string(const _Tp& __t);
                 ^
zpaqfranz.cpp:20382:6: error: use of undeclared identifier 'flaglongpath'
        if (flaglongpath)
            ^
3 errors generated.
*** Error 1 in /usr/local/pobj/zpaqfranz-55.4/zpaqfranz-55.4 (Makefile:10 'zpaqfranz')
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2967 '/usr/local/pobj/zpaqfranz-55.4/.build_done': @cd /usr/local/pobj/zpaqfranz-...)
*** Error 2 in /usr/ports/archivers/zpaqfranz (/usr/ports/infrastructure/mk/bsd.port.mk:2607 'fake': @lock=zpaqfranz-55.4;  export _LOCKS_HE...)
fcorbelli commented 2 years ago

OK, I'll fire up the VM

fcorbelli commented 2 years ago

default

root:/zp# clang++ -Dunix -O2 zpaqfranz.cpp -o zpaqfranz -pthread
root:/zp#
fcorbelli commented 2 years ago

Maybe I get it... just way a minute...

fcorbelli commented 2 years ago

The "new 55.5" should compile (it's a 55.4 with only the name changed)
github "intelligently" tries to understand if the releases have already been made.

root:/zp# md5 zpaqfranz.cpp
MD5 (zpaqfranz.cpp) = b51a84d77b3350342385c833955cd4d5
root:/zp# clang++ -Dunix -pipe -O2 zpaqfranz.cpp -o zpaqfranz -pthread
root:/zp# uname -a
OpenBSD gigazarc.francocorbelli.it 6.6 GENERIC.MP#8 amd64
root:/zp# ./zpaqfranz
zpaqfranz v55.5-experimental archiver,  compiled Jul 20 2022
Usage: zpaqfranz command archive[.zpaq] files|directory... -switches...
             a: Append files          |          t: Test (integrity)
             x: Extract versions      |          l: List files
             v: Verify on filesystem  |          i: Info (show versions)
fcorbelli commented 2 years ago

Short version: try 55.5

dertuxmalwieder commented 2 years ago

GitHub sucks in a lot of very creative ways. Well, your choice. 55.5 works. I think this can be closed then! :)