lua-enet icon indicating copy to clipboard operation
lua-enet copied to clipboard

Build issues on ubuntu 12.04

Open josefnpat opened this issue 10 years ago • 3 comments

I was trying to recreate an issue that @bobbyjoness (Sorry bobbyjones) was having, and I was able to reproduce it.

I'm guessing that the enet deps on 12.04 are old, but perhaps there's a way to compensate?

This is from a pretty fresh ubuntu 12.04 vm instance;

seppi@seppi-VirtualBox:~$ cat /etc/issue
Ubuntu 12.04.2 LTS \n \l

seppi@seppi-VirtualBox:~$ sudo apt-get install libenet* luarocks
[sudo] password for seppi: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libenet-dev' for regex 'libenet*'
Note, selecting 'libenet-doc' for regex 'libenet*'
Note, selecting 'libenet1a-dbg' for regex 'libenet*'
Note, selecting 'libenet1' for regex 'libenet*'
Note, selecting 'libenet1-dev' for regex 'libenet*'
Note, selecting 'libenet1a' for regex 'libenet*'
luarocks is already the newest version.
The following packages were automatically installed and are no longer required:
  libflac++6 liblove
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libenet-dev libenet-doc libenet1a libenet1a-dbg
0 upgraded, 4 newly installed, 0 to remove and 244 not upgraded.
Need to get 136 kB of archives.
After this operation, 1,106 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe libenet1a amd64 1.3.3-2ubuntu1 [22.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/universe libenet-dev amd64 1.3.3-2ubuntu1 [10.1 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/universe libenet-doc all 1.3.3-2ubuntu1 [65.5 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/universe libenet1a-dbg amd64 1.3.3-2ubuntu1 [38.0 kB]
Fetched 136 kB in 0s (192 kB/s)     
Selecting previously unselected package libenet1a.
(Reading database ... 166398 files and directories currently installed.)
Unpacking libenet1a (from .../libenet1a_1.3.3-2ubuntu1_amd64.deb) ...
Selecting previously unselected package libenet-dev.
Unpacking libenet-dev (from .../libenet-dev_1.3.3-2ubuntu1_amd64.deb) ...
Selecting previously unselected package libenet-doc.
Unpacking libenet-doc (from .../libenet-doc_1.3.3-2ubuntu1_all.deb) ...
Selecting previously unselected package libenet1a-dbg.
Unpacking libenet1a-dbg (from .../libenet1a-dbg_1.3.3-2ubuntu1_amd64.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Setting up libenet1a (1.3.3-2ubuntu1) ...
Setting up libenet-dev (1.3.3-2ubuntu1) ...
Setting up libenet-doc (1.3.3-2ubuntu1) ...
Setting up libenet1a-dbg (1.3.3-2ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
seppi@seppi-VirtualBox:~$ sudo luarocks install enet
Installing http://luarocks.org/repositories/rocks/enet-1.1-1.src.rock...
Using http://luarocks.org/repositories/rocks/enet-1.1-1.src.rock... switching to 'build' mode
Archive:  /tmp/luarocks_luarocks-rock-enet-1.1-1-9633/enet-1.1-1.src.rock
  inflating: enet-1.1-1.rockspec     
   creating: lua-enet/
   creating: lua-enet/examples/
   creating: lua-enet/examples/unreliable/
  inflating: lua-enet/examples/unreliable/server.lua  
  inflating: lua-enet/examples/unreliable/client.lua  
   creating: lua-enet/examples/simple/
  inflating: lua-enet/examples/simple/server.lua  
  inflating: lua-enet/examples/simple/client.lua  
   creating: lua-enet/examples/channels/
  inflating: lua-enet/examples/channels/server.lua  
  inflating: lua-enet/examples/channels/client.lua  
  inflating: lua-enet/enet.c         
  inflating: lua-enet/enet-dev-1.rockspec  
   creating: lua-enet/docs/
  inflating: lua-enet/docs/index.md  
  inflating: lua-enet/README.md      
  inflating: lua-enet/Makefile       
gcc -O2 -fPIC -I/usr/include/lua5.1 -c enet.c -o enet.o -I/usr/include
enet.c: In function ‘peer_ping_interval’:
enet.c:490:26: error: ‘ENetPeer’ has no member named ‘pingInterval’
enet.c: In function ‘peer_timeout’:
enet.c:513:26: error: ‘ENetPeer’ has no member named ‘timeoutLimit’
enet.c:514:26: error: ‘ENetPeer’ has no member named ‘timeoutMinimum’
enet.c:515:26: error: ‘ENetPeer’ has no member named ‘timeoutMaximum’

Error: Build error: Failed compiling object enet.o

josefnpat avatar Jul 22 '14 04:07 josefnpat

lua-enet is designed for semi-modern versions of ENet (13.8 or 13.9 or so, and later.) I guess Ubuntu 12.04 doesn't include that in its repositories. Maybe there's a more up-to-date PPA.

The ping interval and timeout limits were added with ENet version 1.3.4, in 2012.

slime73 avatar Jul 22 '14 04:07 slime73

"@slime73 is technically correct - the best kind of correct"

Downloading the newest version of enet, and compiling and installing from source fixes this.

http://pastebin.com/gdxe1Vnp

josefnpat avatar Jul 22 '14 04:07 josefnpat

ubuntu 13.10 and above have 1.3.8+ (untested). http://packages.ubuntu.com/search?keywords=libenet&searchon=names&suite=all&section=all

@leafo if you don't want to provide backporting, perhaps this ticket should mention what version of enet is required to make this package work.

If it's easy; consider backporting. Otherwise, just state the min enet version. Either seems fine to me.

josefnpat avatar Jul 22 '14 05:07 josefnpat