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

Error: error loading plugins: loading plugin /data/ipfs/plugins/go-ds-s3.so: not built with cgo support #213

Closed
tiago-peres opened this issue Dec 17, 2021 · 11 comments · Fixed by #214
Labels
need/triage Needs initial labeling and prioritization

Comments

@tiago-peres
Copy link

After

1- cloning the repo
2- run make build (getting as output s3plugin.so)
3- run make install
4- make the appropriate changes in both /data/ipfs/config

"Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
         "child": {
           "type": "s3ds",
           "region": "us-east-1",
           "bucket": "ipfs-test2-node",
           "accessKey": "******",
           "secretKey": "******"
        },
        "mountpoint": "/blocks",
        "prefix": "s3.datastore",
        "type": "measure"
       },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },

and /data/ipfs/datastore_spec,

{"mounts":[{"bucket":"ipfs-test2-node","mountpoint":"/blocks","region":"us-east-1","rootDirectory":""},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"}

I restarted ipfs sudo systemctl restart ipfs

and then while checking that didn't have errors

systemctl status ipfs

then got

Error: error loading plugins: loading plugin /data/ipfs/plugins/go-ds-s3.so: not built with cgo support

image

@tiago-peres tiago-peres added the need/triage Needs initial labeling and prioritization label Dec 17, 2021
@welcome
Copy link

welcome bot commented Dec 17, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@Stebalien
Copy link
Member

Do you have CGO_ENABLED=0 set in your environment? That'll break plugin builds.

Run make build CGO_ENABLED=1.

Stebalien added a commit that referenced this issue Dec 19, 2021
This is required for plugins to work. It should be enabled by default,
but apparently not in all cases.

fixes #213
@Stebalien
Copy link
Member

Fix in #214.

@Stebalien
Copy link
Member

Merged. Please close this issue if it works, otherwise respond here.

@tiago-peres
Copy link
Author

tiago-peres commented Dec 20, 2021

That didn't solve the issue for me though...

image

@Stebalien
Copy link
Member

Ah... sorry, I misinterpreted the source of the message.

The issue is that your go-ipfs version itself wasn't built with CGO support. How did you build/install go-ipfs?

@tiago-peres
Copy link
Author

I followed the next steps

  1. wget https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-386.tar.gz (download go-ipfs binary)

  2. tar xvfz go-ipfs_v0.9.1_linux-386.tar.gz (unpack the binary)

  3. rm go-ipfs_v0.9.1_linux-386.tar.gz (remove the downloaded archive)

  4. sudo mv go-ipfs/ipfs /usr/local/bin (move it to a particular folder)

  5. rm -rf go-ipfs (remove it from the other location)

  6. echo 'export IPFS_PATH=/data/ipfs' >>~/.bash_profile (add the IPFS repo path (/data/ipfs) to the .bash_profile script)

  7. source ~/.bash_profile (source what was done before (run the code contained in the file))

  8. sudo mkdir -p $IPFS_PATH (make sure to make the required directory)

  9. sudo chown ubuntu:ubuntu $IPFS_PATH (take ownership of the directory)

  10. ipfs init --profile server (initialize IPFS server)

@Stebalien
Copy link
Member

Ah, I see. At the moment, plugins only work on 64bit Linux for the pre-built binaries (because they're built on 64bit linux and building go-ipfs with CGO support for foreign architectures is tricky). For now, you'll have to build go-ipfs from source or use the 64bit version (or use the go-ipfs docker container).

I've filed an issue to support this in our build system (ipfs/distributions#546).

@Stebalien
Copy link
Member

(but please use the latest version, v0.9.1 is about 4 months out of date and is missing some important fixes)

@tiago-peres
Copy link
Author

tiago-peres commented Dec 28, 2021

@Stebalien while using an Ubuntu 20.04 (x86), if I change the first step to

wget https://dist.ipfs.io/go-ipfs/v0.11.0/go-ipfs_v0.11.0_linux-amd64.tar.gz

like you're suggesting, then eventually when initializing the IPFS server, this is what will get

ERROR   provider.queue  queue/queue.go:124      Failed to enqueue cid: leveldb: closed

image

This error would also happen using https://dist.ipfs.io/go-ipfs/v0.11.0/go-ipfs_v0.11.0_linux-386.tar.gz, yet according to hector

It is superficial and has no effect on the installation.

Anyways, I followed through with the procedure with go-ipfs_v0.11.0_linux-amd64 and in the end got into the following problem

image

@Stebalien
Copy link
Member

There should be more to that error log. Hector is right, that error is a different bug (that shouldn't actually affect anything).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants