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

coredhcp build error #176

Open
wuxiao-ling197 opened this issue Nov 1, 2023 · 4 comments
Open

coredhcp build error #176

wuxiao-ling197 opened this issue Nov 1, 2023 · 4 comments

Comments

@wuxiao-ling197
Copy link

when I go build coredhcp,there is always an error that "could not setup lease storage: failed to open lease database leases.txt: table creation failed: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub",how could deal with it?

@Natolumin
Copy link
Member

I can't reproduce this build error. The message you quote looks like a runtime error to me? specifically it would come from

return nil, fmt.Errorf("could not setup lease storage: %w", err)

You have 2 options here:

  • Enable cgo (build with CGO_ENABLED=1) to use sqlite if you're using the range plugin
  • Change your configuration to not load the range plugin if not using it

I'm keeping this open, as I think we should make it an actual build failure if the range plugin (which requires cgo) is built with cgo disabled

@wuxiao-ling197
Copy link
Author

Thank your answer! I resolved this problem following the second way. and I chose the DHCPv4 but its can`t run the client with " FATAL main: short hardware addrss: less than 4 bytes " , is the client progrom not support v4 server ?

@Natolumin
Copy link
Member

The client in this repository is only a debugging tool and not meant to be used as a general client; It indeed only supports DHCPv6.
You could try the DHCPv4 client maintained by upstream: https://github.com/insomniacslk/dhcp/tree/master/dhcpv4/nclient4

@wuxiao-ling197
Copy link
Author

wuxiao-ling197 commented Mar 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants