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

go-sqlite3 "Too many errors" #11

Closed
Jonovono opened this issue Oct 6, 2013 · 8 comments
Closed

go-sqlite3 "Too many errors" #11

Jonovono opened this issue Oct 6, 2013 · 8 comments
Labels

Comments

@Jonovono
Copy link

Jonovono commented Oct 6, 2013

Hi. I am trying to get this running with Go: go1.1.2 darwin/amd64

Running:
go get github.com/conformal/btcd

Gives me the output

$ go get github.com/conformal/btcd
github.com/conformal/btcd
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol close
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol access
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol getcwd
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol stat$INODE64
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fstat$INODE64
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol ftruncate
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fcntl
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol read
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pread
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol write
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pwrite
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fchmod
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol unlink
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mkdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol rmdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mmap
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol munmap
github.com/mattn/go-sqlite3(__DATA/__data): unhandled relocation for close (type 28 rtype 120)
github.com/mattn/go-sqlite3(__DATA/__data): unhandled relocation for access (type 28 rtype 120)
github.com/mattn/go-sqlite3(__DATA/__data): unhandled relocation for getcwd (type 28 rtype 120)
github.com/mattn/go-sqlite3(__DATA/__data): unhandled relocation for stat$INODE64 (type 28 rtype 120)
too many errors

Any thoughts?

@davecgh
Copy link
Member

davecgh commented Oct 7, 2013

What version of Go are you using? I found a post on the Go mailing list that claims this was an issue with Go 1.1.1 and is fixed in Go 1.1.2 here.

If you're running Go 1.1.2 and still having issues, please try the following:

$ go install -ldflags '-linkmode=external' github.com/mattn/go-sqlite3

In the near future, as soon as the package is stable, we plan to move to the pure Go leveldb implementation which will alleviate the need for cgo altogether and will reduce these types of issues.

@colindean
Copy link

The go-sqlite issue is being tracked on mattn/go-sqlite3#80.

@colindean
Copy link

The error causing this is fixed in Go 1.2 and HEAD branch right now. Just installed HEAD (brew install go --HEAD) and confirmed it able to at least install.

@rdymac
Copy link

rdymac commented Oct 15, 2013

Another go-sqlite3 error

$ go get github.com/conformal/btcd
# github.com/mattn/go-sqlite3
clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'

@collindean I'm not able to install brew install go --HEAD it throws errors. I have go-1.1.2 installed right now.

@davecgh same error running $ go install -ldflags '-linkmode=external' github.com/mattn/go-sqlite3. Do I have to remove all go installation, src and pkg s before doing so?

@davecgh
Copy link
Member

davecgh commented Oct 15, 2013

@rdymac This is one of the problems with having a cgo dep. Luckily sqlite is going to be removed in short order in favor of the pure Go leveldb implementation which has already been made the default. Aside from not using cgo, it also happens to be way faster, so it's a net win.

However, if you want to try and get it to work in the mean time, does mattn/go-sqlite3#80 (comment) work for you?

@rdymac
Copy link

rdymac commented Oct 15, 2013

Trying that comment you shared I have just mistakenly installed an older version of gcc, it is taken ages; so I don't think I'll do it again for the correct version. I think I'll wait for the removing of this dep to try btcd out.

Thanks for the answer

@jcvernaleo
Copy link
Member

After some experimenting, I can also confirm that on OSX 10.8, go1.1.2 will not build go-sqlite3 (and therefore will not build btcd). go tip and hopefully go1.2 when it comes out do work just fine.

@davecgh
Copy link
Member

davecgh commented Oct 21, 2013

I'm going to close this since it's resolved as of the latest version of Go.

@davecgh davecgh closed this as completed Oct 21, 2013
davecgh added a commit to davecgh/btcd that referenced this issue Jan 31, 2015
- Group the new read/writeVarBytes functions together to be consistent
  with the existing code
- Modify the comments on the new read/writeVarBytes to be a little more
  descriptive and consistent with existing code
- Use "test payload" for field name in the tests for the
  read/writeVarBytes functions which is more accurate
- Remove reserved param from NewAlert since there is no point is having
  the caller deal with a reserved param
- Various comment tweaks for clarity and consistency
- Use camel case for fuction params for consistency
- Move the NewAlert and NewAlertFromPayload functions after the receiver
  definitions for code layout consistency

Closes btcsuite#11.
mably referenced this issue in ppcsuite/ppcd Jun 4, 2015
Update btcd.conf to use ports used by Peercoin
jcvernaleo pushed a commit to jcvernaleo/btcd that referenced this issue Feb 12, 2016
Most stuff in the file was still for dcrd.

Closes btcsuite#11
davecgh pushed a commit to davecgh/btcd that referenced this issue Aug 16, 2017
zhenyuzhao-cb pushed a commit to zhenyuzhao-cb/btcd that referenced this issue Feb 20, 2023
kcalvinalvin added a commit to kcalvinalvin/btcd that referenced this issue Nov 29, 2024
kcalvinalvin added a commit to kcalvinalvin/btcd that referenced this issue Nov 29, 2024
mempool/estimatefee: Fix negative index bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants