logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Anyone able to compile&run nwnx under Gentoo today?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Feiwill



Joined: 12 Mar 2013
Posts: 7
Location: Czech Republic

PostPosted: Sun May 12, 2013 23:30    Post subject: Anyone able to compile&run nwnx under Gentoo today? Reply with quote

I run nwn under 32b Gentoo. Last time I compiled nwnx it built fine and runs fine even today. That was several months ago. Today I can still compile nwnx cleanly, but nwn won't start with it. Depending on how I formulate LD_PRELOAD I either get no log messages or this:
Code:
ERROR: dlopen: ./nwnx_weapons.so: ./nwnx_weapons.so: undefined symbol: WeaponsStrCommandLookup
ERROR: dlopen: ./nwnx_defenses.so: ./nwnx_defenses.so: undefined symbol: DefensesStrCommandLookup

I changed make.conf a hundred times, recompiled the entire system with various conservative CFLAGS, tried various old gcc's, all to no avail. If you have a Gentoo system which can compile nwnx that runs, please post your `emerge --info`.
_________________
Arkhalia: Czech/Slovak PG/action/loot NWN1 server
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon May 13, 2013 0:04    Post subject: Reply with quote

Did you build with compile.sh or install.sh? They use two different build systems (autoconf and cmake); try both and see if either will work on your system.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
eeriegeek



Joined: 07 Jan 2008
Posts: 59

PostPosted: Mon May 13, 2013 0:36    Post subject: Reply with quote

Another thing to check into. I found an issue last year (see this thread about 4th post) with newer gperf versions and an improper inlining of some generated hash functions which need to exist as callable functions. The fix I came up with was to add the following to gperf_gen.sh:
Code:

sed -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"

Elven added the patch to the 2.8 branch, the fix may have gotten lost in the new merge.

EDIT: Hmmn, no, it looks like the patch is still in master, but I still think it might be related.
Back to top
View user's profile Send private message
Feiwill



Joined: 12 Mar 2013
Posts: 7
Location: Czech Republic

PostPosted: Mon May 13, 2013 13:41    Post subject: Reply with quote

eeriegeek> Downgrading to gperf-3.0.2 from 3.0.4 solved my problem, thanks! Interestingly enough, I used 3.0.4 last time I built nwnx and that nwnx runs OK. Something else must've changed that doesn't cooperate with 3.0.4.

virusman> My problem's gone, but FWIW, the nwnx2 that's in your svn doesn't support cmake at all. It also has no "compile.sh". FYI.

At any rate, I suggest that eeriegeek's finding be considered for a new svn revision. I suppose most distros today use gperf-3.0.4, although it must've been the new gperf + something else that coincided to create the runtime failure I experienced.

Now I'm moving on to another problem: the addition of nwnx_structs segfaults nwserver. But that's for another thread.
_________________
Arkhalia: Czech/Slovak PG/action/loot NWN1 server
Back to top
View user's profile Send private message Visit poster's website
Feiwill



Joined: 12 Mar 2013
Posts: 7
Location: Czech Republic

PostPosted: Mon May 13, 2013 14:43    Post subject: Reply with quote

For anyone who's here because of Gentoo: I could make nwnx_structs run eventually. Here's the Gentoo setup details:

http://www.nwnx.org/phpBB2/viewtopic.php?p=16257
_________________
Arkhalia: Czech/Slovak PG/action/loot NWN1 server
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon May 13, 2013 17:43    Post subject: Reply with quote

The main repo is on github now. I will remove the svn repo soon.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
meaglyn



Joined: 07 Aug 2013
Posts: 3

PostPosted: Wed Aug 07, 2013 16:18    Post subject: nwnx2 and opensuse Reply with quote

eeriegeek wrote:
Another thing to check into. I found an issue last year (see this thread about 4th post) with newer gperf versions and an improper inlining of some generated hash functions which need to exist as callable functions. The fix I came up with was to add the following to gperf_gen.sh:
Code:

sed -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"

Elven added the patch to the 2.8 branch, the fix may have gotten lost in the new merge.

EDIT: Hmmn, no, it looks like the patch is still in master, but I still think it might be related.


This is not implemented for make builds which do the gperf in the Makefiles. I hit this on my opensuse system building the git tree.

Here is a patch which fixes this for me.
Code:

diff --git a/plugins/defenses/Makefile.in b/plugins/defenses/Makefile.in
index 7ee1f64..96361ff 100644
--- a/plugins/defenses/Makefile.in
+++ b/plugins/defenses/Makefile.in
@@ -103,6 +103,7 @@ DefensesStrCmds.h: DefensesStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_DEFENSES_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "DefensesStrCmds.h"
 
 DefensesObjCmds.h: DefensesObjCmds.gperf
@@ -112,6 +113,7 @@ DefensesObjCmds.h: DefensesObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_DEFENSES_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "DefensesObjCmds.h"
 
 NWNXDefenses.o: DefensesStrCmds.h DefensesObjCmds.h NWNXDefenses.h
diff --git a/plugins/funcs/Makefile.in b/plugins/funcs/Makefile.in
index 085fa32..420504c 100644
--- a/plugins/funcs/Makefile.in
+++ b/plugins/funcs/Makefile.in
@@ -173,6 +173,7 @@ FuncsStrCmds.h: FuncsStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_FUNCS_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "FuncsStrCmds.h"
 
 FuncsObjCmds.h: FuncsObjCmds.gperf
@@ -182,6 +183,7 @@ FuncsObjCmds.h: FuncsObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_FUNCS_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "FuncsObjCmds.h"
 
 NWNXFuncs.o: FuncsStrCmds.h FuncsObjCmds.h NWNXFuncs.h
diff --git a/plugins/spells/Makefile.in b/plugins/spells/Makefile.in
index 37794fe..7a541d0 100644
--- a/plugins/spells/Makefile.in
+++ b/plugins/spells/Makefile.in
@@ -66,6 +66,7 @@ SpellsStrCmds.h: SpellsStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_SPELLS_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "SpellsStrCmds.h"
 
 SpellsObjCmds.h: SpellsObjCmds.gperf
@@ -75,6 +76,7 @@ SpellsObjCmds.h: SpellsObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_SPELLS_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "SpellsObjCmds.h"
 
 NWNXSpells.o: SpellsStrCmds.h SpellsObjCmds.h NWNXSpells.h
diff --git a/plugins/structs/Makefile.in b/plugins/structs/Makefile.in
index 159f541..e4f30bd 100644
--- a/plugins/structs/Makefile.in
+++ b/plugins/structs/Makefile.in
@@ -61,6 +61,7 @@ StructsStrCmds.h: StructsStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_STRUCTS_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "StructsStrCmds.h"
 
 StructsObjCmds.h: StructsObjCmds.gperf
@@ -70,6 +71,7 @@ StructsObjCmds.h: StructsObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_STRUCTS_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "StructsObjCmds.h"
 
 NWNXStructs.o: StructsStrCmds.h StructsObjCmds.h NWNXStructs.h
diff --git a/plugins/system/Makefile.in b/plugins/system/Makefile.in
index c661cd9..43cd40a 100644
--- a/plugins/system/Makefile.in
+++ b/plugins/system/Makefile.in
@@ -64,6 +64,7 @@ SystemStrCmds.h: SystemStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_SYSTEM_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "SystemStrCmds.h"
 
 SystemObjCmds.h: SystemObjCmds.gperf
@@ -73,6 +74,7 @@ SystemObjCmds.h: SystemObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_SYSTEM_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "SystemObjCmds.h"
 
 NWNXSystem.o: SystemStrCmds.h SystemObjCmds.h NWNXSystem.h
diff --git a/plugins/tweaks/Makefile.in b/plugins/tweaks/Makefile.in
index 4c35600..cfe2896 100644
--- a/plugins/tweaks/Makefile.in
+++ b/plugins/tweaks/Makefile.in
@@ -54,6 +54,7 @@ TweaksStrCmds.h: TweaksStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_TWEAKS_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "TweaksStrCmds.h"
 
 TweaksObjCmds.h: TweaksObjCmds.gperf
@@ -63,6 +64,7 @@ TweaksObjCmds.h: TweaksObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_TWEAKS_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "TweaksObjCmds.h"
 
 NWNXTweaks.o: TweaksStrCmds.h TweaksObjCmds.h NWNXTweaks.h
diff --git a/plugins/weapons/Makefile.in b/plugins/weapons/Makefile.in
index e9b176e..3b1ec99 100644
--- a/plugins/weapons/Makefile.in
+++ b/plugins/weapons/Makefile.in
@@ -136,6 +136,7 @@ WeaponsStrCmds.h: WeaponsStrCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_WEAPONS_STRCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "WeaponsStrCmds.h"
 
 WeaponsObjCmds.h: WeaponsObjCmds.gperf
@@ -145,6 +146,7 @@ WeaponsObjCmds.h: WeaponsObjCmds.gperf
        $(SED) -i 's/\<\(\(MIN\|MAX\)_\(WORD_LENGTH\|HASH_VALUE\)\|TOTAL_KEYWORDS\)\>/NWNX_WEAPONS_OBJCMD_\1/g' \
          "gperf.out" || rm -f "gperf.out"
        $(SED) -i 's/^const struct/static const struct/' "gperf.out" || rm -f "gperf.out"
+       $(SED) -i 's/|| defined __GNUC_GNU_INLINE__//' "gperf.out" || rm -f "gperf.out"
        $(MV) "gperf.out" "WeaponsObjCmds.h"
 
 NWNXWeapons.o: WeaponsStrCmds.h WeaponsObjCmds.h NWNXWeapons.h


These all load now. I'm just getting started with NWNX so I don't really
have anything which tests them other than that.

The other issue I had was that libmysqlclient does not have a static version on opensuse anymore. I just hacked the odbc_mysql Makefile not to make the static version. I don't have a patch for that since I did not make it configurable.

Cheers,
Meaglyn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group