Browse Source

fix docker run command in README to bring you back to ConsoleClient even if the builds fail; only disable CGO for the OSX build (CGO_ENABLED=0 causes the linux 64 bit build to segfault, and everything works fine when its enabled)

Michael Goldberger 10 years ago
parent
commit
9188579d33
2 changed files with 2 additions and 9 deletions
  1. 1 1
      ConsoleClient/README.md
  2. 1 8
      ConsoleClient/make.bash

+ 1 - 1
ConsoleClient/README.md

@@ -18,7 +18,7 @@ Note that you may need to use `sudo docker` below, depending on your OS.
     -v $(pwd):/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
     psiclient \
     /bin/bash -c 'cd /go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient && ./make.bash' \
-  && cd -
+  ; cd -
   ```
 
 When that command completes, the compiled binaries will be located in the `bin` directory under the current directory. The structure will be:

+ 1 - 8
ConsoleClient/make.bash

@@ -35,10 +35,6 @@ if [ ! -d bin ]; then
   mkdir bin
 fi
 
-# Windows requires CGO due to sqlite. OpenSSL will likely eventually require CGO everywhere
-echo "CGO Enabled"
-export CGO_ENABLED=1
-
 echo "Building windows-i686..."
 CC=/usr/bin/i686-w64-mingw32-gcc gox -verbose -ldflags "$LDFLAGS" -osarch windows/386 -output bin/windows/${EXE_BASENAME}-i686
 # We are finding that UPXing the full Windows Psiphon client produces better results if psiphon-tunnel-core.exe is not already UPX'd.
@@ -49,9 +45,6 @@ CC=/usr/bin/x86_64-w64-mingw32-gcc gox -verbose -ldflags "$LDFLAGS" -osarch wind
 # We are finding that UPXing the full Windows Psiphon client produces better results if psiphon-tunnel-core.exe is not already UPX'd.
 echo "..No UPX for this build"
 
-echo "CGO Enabled unset (Preferred unless needed)"
-unset CGO_ENABLED
-
 echo "Building linux-i686..."
 CFLAGS=-m32 gox -verbose -ldflags "$LDFLAGS" -osarch linux/386 -output bin/linux/${EXE_BASENAME}-i686
 echo "..UPX packaging output"
@@ -63,7 +56,7 @@ echo "..UPX packaging output"
 goupx --best bin/linux/${EXE_BASENAME}-x86_64
 
 echo "Building darwin-x86_64..."
-gox -verbose -ldflags "$LDFLAGS" -osarch darwin/amd64 -output bin/darwin/${EXE_BASENAME}-x86_64
+CGO_ENABLED=0 gox -verbose -ldflags "$LDFLAGS" -osarch darwin/amd64 -output bin/darwin/${EXE_BASENAME}-x86_64
 # Darwin binaries don't seem to be UPXable when built this way
 echo "..No UPX for this build"