Comments (37)
Hi,
Thanks for giving it a shot.
So I'm not familiar with arch linux's packaging system (from google I
gather the package manager is "pacman") but on debian based systems you
need to have:
libgtkglext1-dev - OpenGL Extension to GTK+ (development files)
libgtkglext1 - OpenGL Extension to GTK+ (shared libraries)
installed. Maybe that gives a clue?
In any case, if you cannot resolve the gtkglext issue, you can probably do
"make -i", and it will likely build:
snis_limited_client
snis_server
and all the stl models (you will need openscad installed too for building
the models) but without gtkglext, it will fail to build snis_client.
You can run the game with snis_limited_client instead of snis_client, and
it should work (for now), just the "out the window" 3D view will be kind of
crappy. At some point as I keep working on this, the 3D out the window
view is likely to stop working with the limited client.
(For future reference, if you want to report compile errors, you should
paste the compiler messages exactly, rather than saying something like
"There's a few #include issues regarding "gtk/gtkgl.h"" since I have no way
of knowing what that actually means.)
Thanks,
-- steve
On Sat, Oct 12, 2013 at 6:15 AM, LunaVorax [email protected] wrote:
I tried to compile the latest git on ArchLinux x86_64.
There's a few #include issues regarding "gtk/gtkgl.h" but my programming
knowledge is insufficient to fix the problem and propose a patch.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.
from space-nerds-in-space.
Arch names are a bit different, here's the stuff I've installed:
pacman -S portaudio gtk2 gtkglext lua
For some reason, the lua lib names are different, a quick fix is (from within the SNIS source dir) to do:
ln -s /lib/liblua.so.5.2 liblua5.2.so.0
Then when you run the game you do:
LD_LIBRARY_PATH=./ ./snis_client
from space-nerds-in-space.
hmm, I should probably be using pkg-config to find the -l option for lua instead of:
LIBS=-Lssgl -lssglclient -lrt -lm -llua5.2
in the makefile.
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --libs lua5.2
-llua5.2
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --cflags lua5.2
-I/usr/include/lua5.2
scameron@sleekness ~/github/space-nerds-in-space $
from space-nerds-in-space.
This commit may fix the problem: 1ab1ebe
Do a git pull and see if it builds now.
from space-nerds-in-space.
I'll say this is an Arch bug, "lua" is the 5.2 version, pkg-config --libs lua5.2 will fail
from space-nerds-in-space.
The irony, I'm working on a minimal USB image for SNIS, based on Arch :P
from space-nerds-in-space.
Hmm, you sure?
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --libs lua5.2
-llua5.2
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --libs lua
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
scameron@sleekness ~/github/space-nerds-in-space $
If so, then pkg-config is broken for it's intended purpose.
-- steve
On Sat, Oct 12, 2013 at 11:33 AM, DusteDdk [email protected] wrote:
"lua" is the 5.2 version, but pkg-config --libs lua5.2 will fail
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26200748
.
from space-nerds-in-space.
Yep
18:36:39 dusted@mono~
$ pkg-config --libs lua5.2
Package lua5.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua5.2' found
from space-nerds-in-space.
Well, crap.
On Sat, Oct 12, 2013 at 11:37 AM, DusteDdk [email protected] wrote:
Yep
18:36:39 dusted@mono~
$ pkg-config --libs lua5.2
Package lua5.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.2.pc'to the PKG_CONFIG_PATH environment variable
No package 'lua5.2' foundβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26200836
.
from space-nerds-in-space.
Arch users are hardcore, so they will fix it,
I may make a PKGBUILD file for Arch to jump those hoops
from space-nerds-in-space.
I've filed a bug on Arch.
While we wait, symlinking the lua lib and using LD_LIBRARY_PATH with the binaries on contigrator works on Arch.
from space-nerds-in-space.
Cool. could probably rig the makefile to do something like:
LUALIBS=pkg-config --libs lua5.2 || echo "blah"
where "blah" is the correct answer for arch.
-- steve
On Sat, Oct 12, 2013 at 11:58 AM, DusteDdk [email protected] wrote:
I've filed a bug on Arch.
While we wait, symlinking the lua lib and using LD_LIBRARY_PATH with the
binaries on contigrator works on Arch.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26201317
.
from space-nerds-in-space.
And presumably similar for pkg-config --cflags lua5.2
On Sat, Oct 12, 2013 at 12:36 PM, Stephen Cameron <[email protected]
wrote:
Cool. could probably rig the makefile to do something like:
LUALIBS=
pkg-config --libs lua5.2 || echo "blah"
where "blah" is the correct answer for arch.-- steve
On Sat, Oct 12, 2013 at 11:58 AM, DusteDdk [email protected]:
I've filed a bug on Arch.
While we wait, symlinking the lua lib and using LD_LIBRARY_PATH with the
binaries on contigrator works on Arch.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26201317
.
from space-nerds-in-space.
Maybe, however there's also a problem with the location of lua5.2 header itself, they put it right in /usr/include/lua.h
But 5.1 version is in usr/include/lua5.1/lua.h
It's a bit messy :P
from space-nerds-in-space.
So, if we changed the '#include' line back how it was to include lua.h
rather than lua5.2.h (revert 9adf908 ), and used pkg-config --cflags to get
the right -I directive (with the "|| echo "blah"" hack) that should work,
right?
-- steve
On Sat, Oct 12, 2013 at 12:39 PM, DusteDdk [email protected] wrote:
Maybe, however there's also a problem with the location of lua5.2 header
itself, they put it right in /usr/include/lua.h
But 5.1 version is in usr/include/lua5.1/lua.h
It's a bit messy :Pβ
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26202158
.
from space-nerds-in-space.
You are right, that would be the right thing to do! π
the --libs will need to return -llua -lm
the --cflags can return blank since /usr/include/ is already in the include path.
from space-nerds-in-space.
Ok, pushed it up, give it a try. (I left --cflags as -Ilua5.2 as I figure
it won't hurt...)
But if it does, let me know.
-- steve
On Sat, Oct 12, 2013 at 12:46 PM, DusteDdk [email protected] wrote:
You are right, that would be the right thing to do! [image: π]
the --libs will need to return -llua -lm
the --cflags can return blank since /usr/include/ is already in the
include path.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26202333
.
from space-nerds-in-space.
Nope, can't link ( No package 'lua5.2' found )
But I've observed that Debian won't eat pkg-config --libs/--cflags lua because it wants to know the version.
Also needs libpng, now my arch compiles through, here's a patch from git-format-patch
From 0e03c2367c9fe7562c518275d3dc3fa446a37452 Mon Sep 17 00:00:00 2001
From: Jimmy Christensen <[email protected]>
Date: Sat, 12 Oct 2013 20:12:30 +0200
Subject: [PATCH] Fix makefile for arch
---
Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index db1ad0f..5aeb926 100644
--- a/Makefile
+++ b/Makefile
@@ -51,8 +51,11 @@ endif
# Arch pkg-config seems to be broken for lua5.2, so we have
# this "... || echo" hack thing.
#
-LUALIBS=`pkg-config --libs lua5.2 || echo '-llua5.2'`
-LUACFLAGS=`pkg-config --cflags lua5.2 || echo '-Ilua5.2'`
+LUALIBS=`pkg-config --libs lua5.2 || echo '-llua'`
+LUACFLAGS=`pkg-config --cflags lua5.2 || echo ""`
+
+PNGLIBS=`pkg-config --libs libpng`
+PNGCFLAGS=`pkg-config --cflags libpng`
COMMONOBJS=mathutils.o snis_alloc.o snis_socket_io.o snis_marshal.o \
bline.o shield_strength.o stacktrace.o
@@ -72,7 +75,7 @@ LIMCLIENTOBJS=${COMMONOBJS} ${OGGOBJ} ${SNDOBJS} snis_ui_element.o snis_limited_
stl_parser.o entity.o matrix.o my_point.o liang-barsky.o joystick.o quat.o
SSGL=ssgl/libssglclient.a
-LIBS=-Lssgl -lssglclient -lrt -lm ${LUALIBS}
+LIBS=-Lssgl -lssglclient -lrt -lm ${LUALIBS} ${PNGLIBS}
#
# NOTE: if you get
#
@@ -150,7 +153,7 @@ Q=@
ECHO=echo
endif
-COMPILE=$(CC) ${MYCFLAGS} ${LUACFLAGS} -c -o $@ $< && $(ECHO) ' COMPILE' $<
+COMPILE=$(CC) ${MYCFLAGS} ${LUACFLAGS} ${PNGCFLAGS} -c -o $@ $< && $(ECHO) ' COMPILE' $<
GTKCOMPILE=$(CC) ${MYCFLAGS} ${GTKCFLAGS} -c -o $@ $< && $(ECHO) ' COMPILE' $<
LIMCOMPILE=$(CC) -DWITHOUTOPENGL=1 ${MYCFLAGS} ${GTKCFLAGS} -c -o $@ $< && $(ECHO) ' COMPILE' $<
GLEXTCOMPILE=$(CC) ${MYCFLAGS} ${GTKCFLAGS} ${GLEXTCFLAGS} -c -o $@ $< && $(ECHO) ' COMPILE' $<
--
1.8.4
from space-nerds-in-space.
Committed.
On Sat, Oct 12, 2013 at 1:06 PM, DusteDdk [email protected] wrote:
Nope, can't link ( No package 'lua5.2' found )
But I've observed that Debian won't eat pkg-config --libs/--cflags lua
because it wants to know the version.
Also needs libpng, now my arch compiles through-LUALIBS=pkg-config --libs lua5.2 || echo '-llua5.2'
-LUACFLAGS=pkg-config --cflags lua5.2 || echo '-Ilua5.2'
+LUALIBS=pkg-config --libs lua5.2 || echo '-llua'
+LUACFLAGS=pkg-config --cflags lua5.2 || echo ""
+
+PNGLIBS=pkg-config --libs libpng
+PNGCFLAGS=pkg-config --cflags libpngCOMMONOBJS=mathutils.o snis_alloc.o snis_socket_io.o snis_marshal.o
bline.o shield_strength.o stacktrace.o
@@ -72,7 +75,7 @@ LIMCLIENTOBJS=${COMMONOBJS} ${OGGOBJ} ${SNDOBJS}
snis_ui_element.o snis_limited_
stl_parser.o entity.o matrix.o my_point.o liang-barsky.o joystick.o quat.oSSGL=ssgl/libssglclient.a
-LIBS=-Lssgl -lssglclient -lrt -lm ${LUALIBS}
+LIBS=-Lssgl -lssglclient -lrt -lm ${LUALIBS} ${PNGLIBS}β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26202729
.
from space-nerds-in-space.
That did it on my Arch.
from space-nerds-in-space.
Upon further investigation, it did not work on Arch. There was a hardcoded libpng12 in there that I did not see. Made the program compile and run, but unable to load png files. Sorry about that.
I don't know if it still works on Ubuntu if you remove those ?
From bf5321a57475064913a7db5d43055f2f88edac9a Mon Sep 17 00:00:00 2001
From: Jimmy Christensen <[email protected]>
Date: Sat, 12 Oct 2013 20:51:48 +0200
Subject: [PATCH] Removed hardcoded libpng12 from Makefile.
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 04a60a9..9ffc07c 100644
--- a/Makefile
+++ b/Makefile
@@ -139,10 +139,10 @@ MODELS=${MD}/freighter.stl \
MYCFLAGS=${DEBUGFLAG} ${PROFILEFLAG} ${OPTIMIZEFLAG} ${ILDAFLAG}\
--pedantic -Wall ${STOP_ON_WARN} -pthread -std=gnu99 -rdynamic
GTKCFLAGS=`pkg-config --cflags gtk+-2.0`
-GLEXTCFLAGS=`pkg-config --cflags gtkglext-1.0 libpng12`
+GLEXTCFLAGS=`pkg-config --cflags gtkglext-1.0`
GTKLDFLAGS=`pkg-config --libs gtk+-2.0` \
`pkg-config --libs gthread-2.0`
-GLEXTLDFLAGS=`pkg-config --libs gtkglext-1.0 libpng12`
+GLEXTLDFLAGS=`pkg-config --libs gtkglext-1.0`
VORBISFLAGS=`pkg-config --cflags vorbisfile`
ifeq (${V},1)
--
1.8.4
from space-nerds-in-space.
Yup, works now. π
from space-nerds-in-space.
Cool.
-- steve
On Sat, Oct 12, 2013 at 2:55 PM, DusteDdk [email protected] wrote:
Yup, works now. [image: π]
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26204723
.
from space-nerds-in-space.
Having libpng12 in there is what fixes it for Ubuntu 64-bit. Guess it causes the reverse problem for Arch.
from space-nerds-in-space.
D'oh. So this doesn't work on 64-bit ubuntu?
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --libs libpng
-lpng12
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --cflags
libpng
-I/usr/include/libpng12
scameron@sleekness ~/github/space-nerds-in-space $
-- steve
On Sat, Oct 12, 2013 at 3:37 PM, kwadroke [email protected] wrote:
Having libpng12 in there is what fixes it for Ubuntu 64-bit. Guess it
causes the reverse problem for Arch.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26205510
.
from space-nerds-in-space.
Hmm, maybe this fixes it:
--- a/Makefile
+++ b/Makefile
@@ -139,7 +139,7 @@ MODELS=${MD}/freighter.stl
MYCFLAGS=${DEBUGFLAG} ${PROFILEFLAG} ${OPTIMIZEFLAG} ${ILDAFLAG}
--pedantic -Wall ${STOP_ON_WARN} -pthread -std=gnu99 -rdynamic
GTKCFLAGS=pkg-config --cflags gtk+-2.0
-GLEXTCFLAGS=pkg-config --cflags gtkglext-1.0
+GLEXTCFLAGS=pkg-config --cflags gtkglext-1.0
${PNGCFLAGS}
GTKLDFLAGS=pkg-config --libs gtk+-2.0
pkg-config --libs gthread-2.0
GLEXTLDFLAGS=pkg-config --libs gtkglext-1.0
committed.
On Sat, Oct 12, 2013 at 3:53 PM, Stephen Cameron
[email protected]:
D'oh. So this doesn't work on 64-bit ubuntu?
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --libs
libpng
-lpng12
scameron@sleekness ~/github/space-nerds-in-space $ pkg-config --cflags
libpng
-I/usr/include/libpng12
scameron@sleekness ~/github/space-nerds-in-space $-- steve
On Sat, Oct 12, 2013 at 3:37 PM, kwadroke [email protected]:
Having libpng12 in there is what fixes it for Ubuntu 64-bit. Guess it
causes the reverse problem for Arch.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26205510
.
from space-nerds-in-space.
smcameron, you originally put that in to fix a problem I was having. Just pulled the latest and it's working.
Not sure if removing it broke anything or not.
from space-nerds-in-space.
Yeah, I figured that out, commit e04944d on Sep 16th.
Kinda hard to get it working everywhere all at the same time, heh.
Thanks for testing it out.
-- steve
On Sat, Oct 12, 2013 at 4:02 PM, kwadroke [email protected] wrote:
smcameron, you originally put that in to fix the problem I was having.
Just pulled the latest and it's working.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26205984
.
from space-nerds-in-space.
Latest one still works on Arch too.
from space-nerds-in-space.
For some reason on Arch this is now setup like this:
ls -lh /usr/lib/pkgconfig/lua*
-rw-r--r-- 1 root root 669 3 oct. 04:09 /usr/lib/pkgconfig/lua51.pc
-rw-r--r-- 1 root root 442 3 oct. 04:11 /usr/lib/pkgconfig/lua52.pc
-rw-r--r-- 1 root root 425 10 juil. 2018 /usr/lib/pkgconfig/lua53.pc
-rw-r--r-- 1 root root 586 9 nov. 22:36 /usr/lib/pkgconfig/luajit.pc
lrwxrwxrwx 1 root root 27 10 juil. 2018 /usr/lib/pkgconfig/lua.pc -> /usr/lib/pkgconfig/lua
So you can use pkg-config --libs lua52
(but not lua5.2
)
This outputs -llua5.2 -lm
, so I guess current Makefile is linking lua5.3 instead.
ldd confirms that, currently linking to lua5.3, not sure if itβs a big deal or not.
from space-nerds-in-space.
What about something like:
LUALIBS=`pkg-config --libs lua5.2 --silence-errors || pkg-config --libs lua52 --silence-errors || pkg-config --libs lua || echo '-llua5.2'`
(silencing errors from the first 2 tries allow for having only one error output on screen when lua is not found)
from space-nerds-in-space.
from space-nerds-in-space.
Here's what the patch should have looked like:
Author: Stephen M. Cameron <[email protected]>
Date: Tue Jan 15 08:48:49 2019 -0500
Make pkgconfig detection of lua5.2 more robust, esp. for Arch linux
Suggested-by: McMic <[email protected]>
Signed-off-by: Stephen M. Cameron <[email protected]>
diff --git a/Makefile b/Makefile
index 120ccda..dddd041 100644
--- a/Makefile
+++ b/Makefile
@@ -403,8 +403,8 @@ ifeq (${OSX},0)
# Arch pkg-config seems to be broken for lua5.2, so we have
# this "... || echo" hack thing.
#
-LUALIBS:=$(shell pkg-config --libs lua5.2 || echo '-llua')
-LUACFLAGS:=$(shell pkg-config --cflags lua5.2 || echo '')
+LUALIBS:=$(shell pkg-config --libs lua5.2 --silence-errors || pkg-config --libs lua52 --silence-errors || pkg-config --libs lua --silence-errors || echo '-llua5.2')
+LUACFLAGS:=$(shell pkg-config --cflags lua5.2 --silence-errors || pkg-config --cflags lua52 --silence-errors || pkg-config --libs lua --silence-errors || echo '')
else
# OSX needs to do it this way (what is the point of pkgconfig if they all do it differently?)
LUALIBS:=$(shell pkg-config --libs lua)
from space-nerds-in-space.
Yes, this builds fine!
I still get the same warnings which are unrelated to this:
-Wno-gnu-folding-constant
and-Wno-extended-offsetof
options are unknown to my system- I get lots of warning from
-Wformat-truncation=
and-Wformat-overflow=
which just sounds like paranoia about char[] sizes
[EDIT] And ldd confirms the builds is now linked with lua5.2 and not 5.3
from space-nerds-in-space.
Committed bc326fc
I'd be interested to see those warnings. I'm guessing newer linux's than what I'm running have cranked up some options on gcc... probably nothing serious, but at the same time, some might be easy to fix anyway.
from space-nerds-in-space.
The -Wno-gnu-folding-constant and -Wno-extended-offsetof options were added to allow the project to be built with clang in commit 3cf24a6
from space-nerds-in-space.
I did not past the warnings before because I have them in french. Iβm gonna figure out how to get everything in english and I will open a separate ticket with the complete output.
I guess itβs too late for this commit, but if you mention me in the future the case is supposed to be MCMic
and not McMic
. (Also the email was wrong but that was my fault the github account showed an obsolete one, fixed now)
from space-nerds-in-space.
Related Issues (20)
- snis_client --monitor option has been broken since the SDL2 conversion
- Bug in show_demon_3d() HOT 1
- {request} web interface single computer host HOT 8
- sudo make install - failing with specified parameters HOT 14
- inconsistencies in help function on comms screen HOT 5
- keyboard mappings and interface design for communications station HOT 9
- scan contact velocity is a single number, should be three HOT 6
- keymap & UI/UX: Science! HOT 3
- UX & keymapping wishlist for engineering HOT 5
- missile launch failure HOT 4
- wishlist item for weapon screen: autofire phaser mode HOT 2
- weapons screen wishlist item: zoom HOT 1
- weapons screen wishlist: target specific systems HOT 2
- weapons screen controls request: phaser wavelength hotkeys HOT 1
- helm controls requests HOT 7
- Allow return to lobby from ESC menu HOT 1
- Allow and display keyboard shortcuts in the quit dialogue
- implement conservation of momentum HOT 9
- Fix libglew1.5-dev installation failure; update related documentation HOT 1
- Compile issue - mathutils.c HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from space-nerds-in-space.