You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first I salute you for this great work.
I tried to cross compile and it failed except for the linux/amd64 which is the host.
~ build_all.sh ~ the script used to cross compile~
#!/bin/bash
# List of OS/ARCH combinations to build
targets=(
"linux/amd64"
"linux/arm"
"linux/arm64"
"windows/amd64"
"windows/386"
"darwin/amd64"
"darwin/arm64"
)
# Output directory
output_dir="build"
# Create output directory if it doesn't exist
mkdir -p $output_dir
# Loop over each target and build
for target in "${targets[@]}"; do
os=$(echo $target | cut -d'/' -f1)
arch=$(echo $target | cut -d'/' -f2)
output_name="out-$os-$arch"
if [ "$os" = "windows" ]; then
output_name+=".exe"
fi
echo "Building for $os/$arch..."
GOOS=$os GOARCH=$arch go build -o $output_dir/$output_name main.go
if [ $? -ne 0 ]; then
echo "An error occurred while building for $os/$arch."
fi
done
echo "Builds completed and placed in the $output_dir directory."
```
# bash build_all.sh
Building for linux/amd64...
Building for linux/arm...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for linux/arm.
Building for linux/arm64...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for linux/arm64.
Building for windows/amd64...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for windows/amd64.
Building for windows/386...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for windows/386.
Building for darwin/amd64...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for darwin/amd64.
Building for darwin/arm64...
package command-line-arguments
imports github.com/ipsn/go-libtor
imports github.com/ipsn/go-libtor/libtor: build constraints exclude all Go files in /root/go/pkg/mod/github.com/ipsn/[email protected]/libtor
An error occurred while building for darwin/arm64.
Builds completed and placed in the build directory.
```
The text was updated successfully, but these errors were encountered:
first I salute you for this great work.
I tried to cross compile and it failed except for the linux/amd64 which is the host.
~ build_all.sh ~ the script used to cross compile~
The text was updated successfully, but these errors were encountered: