GithubHelp home page GithubHelp logo

Windows 64bit build about libsodium HOT 13 CLOSED

jedisct1 avatar jedisct1 commented on May 22, 2024
Windows 64bit build

from libsodium.

Comments (13)

sneves avatar sneves commented on May 22, 2024

I have been able to reproduce this. Generally, failed tests seem to be a build system problem; compiling them manually and running them seems to work fine (i.e., they pass). I haven't figured out yet what exactly in the build system makes the binaries fail.

I have also been able to reproduce the crypto_secretbox crash. This is due to the inclusion of the amd64_xmm6 optimized Salsa20 assembly implementation, which assumes the usual AMD64 ABI. On Windows the parameter transfer registers are not the same, and thus the crash. You can get around this by passing --disable-asm to configure script.

from libsodium.

jbrantly avatar jbrantly commented on May 22, 2024

Passing --disable-asm to the configure script did work for me. Thank you very much!

Going to leave this issue open since I'm assuming the intent is for this to work out-of-the-box. I would love to contribute but I'm afraid this is not my area of expertise.

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

Hello,
I'm going to take a look. Glad that --disable-asm works around it, but yes, the intent is that it should work out of the box.
Thanks again for reporting this!

from libsodium.

neheb avatar neheb commented on May 22, 2024

I tried this using the MinGW toolchain from cygwin's installer and for me, it hangs at

CCAS crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.lo
CCLD libsodium.la

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

Hi Neheb
Was that with mingw64, too?
Use ./configure --disable-asm for now. I'll see how to work around this.

from libsodium.

neheb avatar neheb commented on May 22, 2024

It was mingw64 indeed. On further inspection, this looks like a separate issue. For me, the CCLD line is hanging for some reason. Even if I add --disable-asm, it hangs. My full configure line is "./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --disable-asm". I also use make without -j#.

Note that regular cygwin compiles that use cygwin1.dll work fine.

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

Looks like --disable-pie is required when using the latest mingw-builds. Not with other mingw64 distributions. What a mess...

from libsodium.

neheb avatar neheb commented on May 22, 2024

You might also want to disable asm for cygwin64 as well. make check output:

../../test-driver: line 95: 6000 Segmentation fault (core dumped) "$@" > $log_file 2>&1
FAIL: box7.exe
../../test-driver: line 95: 2468 Segmentation fault (core dumped) "$@" > $log_file 2>&1
FAIL: box8.exe

it also hangs on secretbox2.

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

What is host_os for cygwin64? cygwin64?

from libsodium.

neheb avatar neheb commented on May 22, 2024

that should be it.

edit: hmmm nevermind?

$ grep host_os < Makefile
host_os = cygwin

after ./configure

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

Can you check in config.log? config.guess doesn't seem to mention it. Checking host is probably safer, though.

from libsodium.

neheb avatar neheb commented on May 22, 2024

host='x86_64-unknown-cygwin'
host_alias=''
host_cpu='x86_64'
host_os='cygwin'
host_vendor='unknown'

from libsodium.

jedisct1 avatar jedisct1 commented on May 22, 2024

Thanks!

38d0a4d should do the trick.

from libsodium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.