Minimum requirement for lxd-p2c


#22

Does not work with the =.
Also, in your command, I can see some Unicode quotes which are a big no no.
I cannot understand how you go them, since this forum software does not do any superfluous text formatting.

Here the following is on Ubuntu 18.04, running Go 1.11 (snap package).

$ go version
go version go1.11 linux/amd64
$ go get -a -v -x -ldflags '-extldflags "-static"' github.com/lxc/lxd/lxd-p2c
...
$ cd $GOPATH/bin
$ ldd lxd-p2c 
	not a dynamic executable
Exit 1

Verify that ldd says that the executable is not dynamic (i.e. it’s static).


(Sean Fulton) #23

I manually re-typed the whole line, got the ldd output as you indicate, copied it over to a centos 6 box:

[root@nj-web01-cl01 ~]# uname -a
Linux nj-web01-cl01 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@nj-web01-cl01 ~]# ./lxd-p2c
FATAL: kernel too old
Aborted


#24

What kernel version does Centos 6 have? Distrowatch says Linux 2.6. Is that really your kernel version on Centos?

You can add the --enable-kernel=x.y.z option when you compile the binary.
See more at http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html


#25

Did you ever find a resolution to this? I am having the same problem. I started a new thread.

Is the lxd server a member of a cluster?

Thanks,


#26

This thread is about generating the lxd-p2c executable file.
Your thread is about an issue with lxd-p2c not working.


(Sean Fulton) #27

Sorry for the delay in getting back to you. The kernel is 2.6.32 in centos.

I built it with this am still getting the kernel too old message:

go get -a -v -x -ldflags β€˜-extldflags β€œ-static --enable-kernel-=2.6.32”’ github.com/lxc/lxd/lxd-p2c