Menu

#28 p7zip version 15.09 fails to build on s390

Unstable (example)
closed-fixed
my p7zip
s390 (1)
5
2016-03-13
2015-12-01
No

Hi,

p7zip version 15.09 fails to build on s390, 32 bit architecture. I checked this on Fedora 21 and later releases. Following is the build error message :
-DUNIX_USE_WIN_FILE -DEXTRACT_ONLY -DNO_READ_FROM_CODER -D_SFX ../../../../CPP/myWindows/mySplitCommandLine.cpp
../../../../CPP/myWindows/mySplitCommandLine.cpp:99:8: error: #error ENDIANNESS
#error ENDIANNESS
Complete build log is avilable at http://s390.koji.fedoraproject.org/kojifiles/work/tasks/4855/1994855/build.log .

Reason of this build failure is that it doesn't recognize s390 architecture as big endian. I have proposed a patch (available in attachment) which allows to recognize both s390 and s390x as big endian. With this patch, p7zip builds fine on s390(x) as well.

Thanks

1 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2015-12-01

    Better patch to support also zarch:

        || defined(__s390__) \
        || defined(__s390x__) \
        || defined(__zarch__) \
        || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
      #define MY_CPU_BE
    
     
  • Igor Pavlov

    Igor Pavlov - 2015-12-02
    • it appears that s390 macro is defined for s390, s390x and zarch arches.

    Is it so for any version of gcc?
    Some another programs also check all off them: __s390__ __s390x__ __zarch__.

     
  • Igor Pavlov

    Igor Pavlov - 2015-12-03

    Are there C / CPP compilers (some old GCC or some another compiler, for example, some compiler from IBM) that can use __s390x__ or __zarch__ without __s390__?

     
  • Dan Horak

    Dan Horak - 2015-12-03

    That's a good question, the s390 being defined for both 32 and 64 bit s390 is IBM decision (they do provide the s390 support in the compilers, I'm not aware of any purely community developed compiler), so all compilers should follow the scheme. AFAIK there is no 32-bit compiler in LLVM for s390. Although using only s390 should be safe, it might be actually better to check for both s390 and s390x.

     
  • Igor Pavlov

    Igor Pavlov - 2015-12-03

    Actually crypto++ checks all of them:
    http://www.cryptopp.com/docs/ref/config_8h_source.html
    So I supposed that I can do it in 7-Zip too.

     
  • Dan Horak

    Dan Horak - 2015-12-03

    no objections :-)

     
  • my p7zip

    my p7zip - 2016-03-13
    • status: open --> closed-fixed
     
  • my p7zip

    my p7zip - 2016-03-13

    Please try p7zip 15.14.

     

Log in to post a comment.

MongoDB Logo MongoDB