Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linux Support #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:1.18

# Clone go algorand
RUN mkdir -p "/Users/fergal/"
WORKDIR "/Users/fergal/"
RUN git clone https://github.com/algorand/go-algorand.git

# Checkout v3.8.1
WORKDIR "/Users/fergal/go-algorand/"
RUN git checkout v3.8.1-stable
Copy link
Author

@kadircancetin kadircancetin Sep 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not build with v3.9 :/ . Also can not build with in my host machine as well.

Copy link
Author

@kadircancetin kadircancetin Sep 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# github.com/mattn/go-sqlite3
sqlite3-binding.c: In function 'sqlite3SelectNew':
sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr]
123303 |   return pNew;
       |          ^~~~
sqlite3-binding.c:123263:10: note: declared here
123263 |   Select standin;
       |          ^~~~~~~
# github.com/Hipo/algojig
./main.go:163:43: not enough arguments in call to verify.TxnGroup
        have ([]transactions.SignedTxn, bookkeeping.BlockHeader, verify.VerifiedTransactionCache)
        want ([]transactions.SignedTxn, bookkeeping.BlockHeader, verify.VerifiedTransactionCache, logic.LedgerForSignature)

This is the exception I got when I try v3.9.x. Same exception without docker.


# run algo node builds
RUN ./scripts/configure_dev.sh
RUN ./scripts/buildtools/install_buildtools.sh
RUN make install

# Run on host machine:
# ====================
# ```
# docker build -t local/algojig .;
# docker run -v $(pwd):/algojig -ti local/algojig /bin/bash -c "cd /algojig/gojig; go build -o ../algojig/algojig_linux_x86_64";
# ```
File renamed without changes.
File renamed without changes.
Binary file added algojig/algojig_linux_x86_64
Binary file not shown.
5 changes: 3 additions & 2 deletions algojig/gojig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

import algojig

machine = platform.machine()
binary = f'algojig_{machine}'
machine = platform.machine().lower()
system = platform.system().lower()
binary = f'algojig_{system}_{machine}'


def run(command, *args, input=None):
Expand Down