Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 328 329 [330] 331 332 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1003460 times)

Blaze

  • Bay Watcher
  • The Chaos that Crawls up on you with a Smile.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4935 on: December 04, 2013, 04:45:51 pm »

Dfusion appears to not work at all, I just get errors when I try to use any commands.

Also there no longer appears to be a way to change the number of starting dwarves. Am I missing something?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4936 on: December 04, 2013, 04:47:42 pm »

starting dwarves is startdwarf.rb, not sure if it comes with DFHack 0.34.11 r3

Yeah, all of the .o files for dfusion are missing and have to be manually compiled right now

greycat

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4937 on: December 04, 2013, 07:40:17 pm »

That DFHack r4 tag doesn't build on Linux (or OSX, due to another error).

Regarding the specific error you got, I fixed it for myself with this commit: https://github.com/Falconne/dfhack/commit/25b06a48c113a33fc7f64fc37838cdc4552fd3db

It's probably been fixed differently by others.

Awesome, thanks!  It built for me with that one-line change.

------------------------------------------------------------------------------------------------------------------

Hmm.  OK, next problem:

Code: [Select]
golem:/usr/local/src/df_linux+DFHack_r4_git$ ./dfhack
./libs/Dwarf_Fortress: /usr/local/src/df_linux+DFHack_r4_git/libs/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./hack/libdfhack.so)
./libs/Dwarf_Fortress: /usr/local/src/df_linux+DFHack_r4_git/libs/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./hack/libdfhack.so)
-e

Inspecting the libs/libstdc++.so.6 file shows:

Code: [Select]
$ nm -D libs/libstdc++.so.6 | grep CXXABI
00000000 A CXXABI_1.3
00000000 A CXXABI_1.3.1
00000000 A CXXABI_1.3.2
00000000 A CXXABI_1.3.3
00000000 A CXXABI_1.3.4

$ nm -D libs/libstdc++.so.6 | grep GLIBCXX
00000000 A GLIBCXX_3.4
00000000 A GLIBCXX_3.4.1
00000000 A GLIBCXX_3.4.10
00000000 A GLIBCXX_3.4.11
00000000 A GLIBCXX_3.4.12
00000000 A GLIBCXX_3.4.13
00000000 A GLIBCXX_3.4.14
00000000 A GLIBCXX_3.4.2
00000000 A GLIBCXX_3.4.3
00000000 A GLIBCXX_3.4.4
00000000 A GLIBCXX_3.4.5
00000000 A GLIBCXX_3.4.6
00000000 A GLIBCXX_3.4.7
00000000 A GLIBCXX_3.4.8
00000000 A GLIBCXX_3.4.9

Googling led me to http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html which seems to say that GLIBCXX_3.4.14 and CXXABI_1.3.4 come from gcc 4.5.0.  And I have gcc 4.7.2 on this computer.  Does this mean my gcc is too new, and I should try to build with 4.5 instead?

------------------------------------------------------------------------------------------------------------------

All right, let's see.  Debian 7.2 has three multilib-enabled versions of gcc packaged: 4.4, 4.6 and 4.7.  Guess what's missing.  Yeah.  gcc 4.5 is missing.

I tried building with gcc/g++ 4.4 (on Debian this is 4.4.7) and got this error:

Code: [Select]
[ 41%] Building CXX object library/CMakeFiles/dfhack.dir/Core.cpp.o
In file included from /usr/local/src/dfhack/library/Core.cpp:47:
/usr/local/src/dfhack/library/include/modules/EventManager.h:83: error: ‘hash’ is not a template
/usr/local/src/dfhack/library/include/modules/EventManager.h:83: error: explicit specialization of non-template ‘std::hash’
/usr/local/src/dfhack/library/include/modules/EventManager.h:94: error: ‘hash’ is not a template
/usr/local/src/dfhack/library/include/modules/EventManager.h:94: error: ‘std::hash’ is not a template type
make[2]: *** [library/CMakeFiles/dfhack.dir/Core.cpp.o] Error 1
make[1]: *** [library/CMakeFiles/dfhack.dir/all] Error 2
make: *** [all] Error 2

Then I tried with gcc 4.6 (which on Debian is 4.6.3) and it built, but I got the same runtime errors that I did with gcc 4.7.

Not sure what to try next, or why gcc 4.5 is not packaged....
« Last Edit: December 04, 2013, 08:53:57 pm by greycat »
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4938 on: December 04, 2013, 10:29:12 pm »

From what I've heard from people who have compiled it, you do need GCC 4.5. I guess you could try building it from source (it does take a while, but it's fairly straightforward). Also, I was able to install it on OS X with Homebrew, so Linuxbrew might work (although I haven't tried it).

Speaking of OS X, I've been trying to compile r4 and I'm about 90% done with "make" so far. (If anyone's interested, there was an error with MapCache.cpp which I "fixed" by adding "(unsigned int)" before "layer_mats" on line 1146. I also used Falconne's fix above for eventful.) Here's the current problem I'm dealing with:
Code: [Select]
[ 91%] Building CXX object plugins/CMakeFiles/zone.dir/zone.cpp.o
In file included from dfhack-r4/library/include/LuaTools.h:32:0,
                 from dfhack-r4/plugins/zone.cpp:45:
dfhack-r4/library/include/DataDefs.h: In static member function 'static DFHack::compound_identity* df::identity_traits<T>::get() [with T = long unsigned int]':
dfhack-r4/library/include/DataFuncs.h:139:1:   instantiated from 'static void df::function_wrapper<void (*)(DFHack::color_ostream&, A1, A2, A3, A4), true>::execute(lua_State*, int, void (*)(DFHack::color_ostream&, A1, A2, A3, A4)) [with A1 = long unsigned int, A2 = long unsigned int, A3 = long unsigned int, A4 = long unsigned int, lua_State = lua_State]'
dfhack-r4/library/include/DataFuncs.h:222:59:   instantiated from 'void df::function_identity<T>::invoke(lua_State*, int) [with T = void (*)(DFHack::color_ostream&, long unsigned int, long unsigned int, long unsigned int, long unsigned int), lua_State = lua_State]'
dfhack-r4/plugins/zone.cpp:4515:1:   instantiated from here
dfhack-r4/library/include/DataDefs.h:441:54: error: '_identity' is not a member of 'long unsigned int'
This occurs with peterix/master and Falconne/DFHack-r4. I haven't found anything obvious that could be causing this - any ideas?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

danaris

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4939 on: December 05, 2013, 07:57:41 pm »

Oh, hey, saw your PM before I saw this, lethosor ;D

I have r4 building on OS X (tested successfully on 10.8 and 10.9); I just need to push a couple of changes to my repo on Github.
Logged

Ggobs

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4940 on: December 06, 2013, 08:15:58 pm »

I've been playing DF since 40d and never tried DFHack--just Dwarf Therapist and Mayday.

Those two is all I need, but I want to give workflow a chance.

How long after the next release can I reasonably expect a DFHack to be updated to the new release?

Thanks
Logged
Just popping in to say that if DF has taught me anything, it's that everything is doomed.

someone12345

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4941 on: December 06, 2013, 08:20:29 pm »

Advfort is not working for me. When I tried to dig using advfort, it did not work, even though I had a pick equipped. I had used R to move to dig, then took out a pick and pressed alt+up to dig into a wall. It said "correct tool not equipped". I put all of my weapons in my backpack, then tried again. It still did not work. Also, plant picking does not work. I stood on a shrub, then pressed alt+5. It said nothing, and the plant remained there. Can anyone help me?
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4942 on: December 06, 2013, 10:25:28 pm »

Advfort is not working for me. When I tried to dig using advfort, it did not work, even though I had a pick equipped. I had used R to move to dig, then took out a pick and pressed alt+up to dig into a wall. It said "correct tool not equipped". I put all of my weapons in my backpack, then tried again. It still did not work. Also, plant picking does not work. I stood on a shrub, then pressed alt+5. It said nothing, and the plant remained there. Can anyone help me?

Adv-fort can be strange sometimes.

With mining and woodcutting, the pick/axe has to be in your dominant hand. Try emptying your hands by either dropping everything or stowing everything in your pack, then take only your pick out. If you lost your dominant hand in a fight, you will not be able to mine or chop wood.

Not sure about plant picking, but it may be because you are hungry or thirsty. If you are hungry, thirsty, or tired, you will not be able to do jobs since the A.I. logic will try to eat or drink before doing the job, even if your character has nothing to eat or drink.
Logged
I take great solace in your flammability.

someone12345

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4943 on: December 06, 2013, 10:33:46 pm »

No, my character is not hungry, thirsty, or tired. Also, which is the dominant hand of a character? I only have a pick in my hands, and it is multigrasp.
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

greycat

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4944 on: December 06, 2013, 10:50:21 pm »

From what I've heard from people who have compiled it, you do need GCC 4.5. I guess you could try building it from source (it does take a while, but it's fairly straightforward).

I was afraid of that.

I've actually managed to get it to build and run (though I haven't actually tested it beyond that).  It was not an easy process, so I'm going to try to piece together everything I did.  Maybe this will help someone else some day.

First thing I did was look through Debian bug reports, package archives, and the like.  There was a gcc-4.5 once upon a time, but it was completely removed in favor of gcc-4.6.  The packages are gone.  Totally deleted from the archive and everything.

So, next thing I did was install Debian 6.0 (squeeze) in a chroot, using debootstrap.  I decided to use the i386 version because DF is 32-bit.  No sense fighting multilib stuff at the same time I'm fighting everything else.  I installed build-essential and a few other packages.  It turns out Debian 6.0 has gcc-4.3 and gcc-4.4 only.

OK, so then I built gcc-4.5 and g++-4.5 from source.  This was not nearly as straightforward as I'd hoped, because the documentation says "don't give a target! we'll just figure it out for you", but that doesn't work so well in practice.  My kernel reports x86_64 because it's a 64-bit kernel, and gcc's bootstrap apparently decides, based on that, that I want a 64-bit compiler.  Which fails to build with a mysterious error somewhere along the way (something about missing gnu-stabs with a 64 somewhere in the pathname).  I finally managed to get it to build with: ../gcc-4.5.4/configure --enable-languages='c,c++' --disable-multilib i486-linux-gnu

(i486-linux-gnu was the target reported by "gcc -v" using Debian's gcc, so I used that.)

Next I copied the dfhack source directory into the chroot.  I installed cmake, libxml stuff, and so on.  I copied over the Dwarf Fortress 0.34.11 tarball and extracted that, exported CC=gcc-4.5 and CXX=g++-4.5 and then ran the cmake command for dfhack in an empty build directory.  This failed on zlib, so I fixed it by installing zlib1g-dev.  Blew away the build directory, recreated it, ran cmake again.  Then ran make -- which failed with a generate_headers error on some ruby-autogen thing at about 98% completion.

After inspecting the build.make files (the one in the chroot vs. the one not in the chroot -- they were different), I decided maybe the cmake version was wrong.  Debian 6.0 has cmake 2.8.2, and Debian 7.2 has cmake 2.8.9.  Going on that theory, I found cmake's web site and downloaded the latest source code for that, which was version 2.8.12.1.  I removed the cmake Debian package, and bootstrapped cmake 2.8.12.1 from source.  (This was in the terminal where CC and CXX were still exported to gcc-4.5 so it picked those up and used them.  I decided to let it go.)

Then back to the dfhack directory.  Blew away the build directory, recreated it yet again, re-ran cmake, and make.  And it finally worked!  Did the "make install", copied the modified df_linux directory from the chroot over to the regular system, and ran ./dfhack to be sure it actually starts up.  Which it did.

That's all I've got for now.
Logged
Hell, if nobody's suffocated because of it, it hardly counts as a bug! -- StLeibowitz

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4945 on: December 06, 2013, 11:03:55 pm »

No, my character is not hungry, thirsty, or tired. Also, which is the dominant hand of a character? I only have a pick in my hands, and it is multigrasp.

The logic that tells a creature to eat, drink, or sleep will kick in shortly before the status effect will show in their info-screen, so you might not look hungry, but you might be. Or there might be something else keeping adv-fort from picking the plant. This might sound silly, but is the plant dead? Sometimes walking onto plants will kill them.

The dominant hand is chosen at random when a creature is created. To see which hand is dominant, drop everything then pick up something light enough to wield one-handed.

I'm not sure if holding your pick multi-grasp has any effect on adv-fort logic, so I can't comment on that.
Logged
I take great solace in your flammability.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4946 on: December 07, 2013, 02:29:48 am »

Hmm.  OK, next problem:

Code: [Select]
golem:/usr/local/src/df_linux+DFHack_r4_git$ ./dfhack
./libs/Dwarf_Fortress: /usr/local/src/df_linux+DFHack_r4_git/libs/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by ./hack/libdfhack.so)
./libs/Dwarf_Fortress: /usr/local/src/df_linux+DFHack_r4_git/libs/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./hack/libdfhack.so)
-e

Just delete that libs/libstdc++.so.6 and let it use your system library.

How long after the next release can I reasonably expect a DFHack to be updated to the new release?

Could be a few weeks for the initial release in the worst case, depending on how much time people have to work on it. I'd suggest waiting a couple of weeks before getting impatient, and thus being nicely surprised if it takes less. :) Subsequent bugfix releases are a lot easier, since not so much changes.
« Last Edit: December 07, 2013, 02:40:16 am by ag »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4947 on: December 07, 2013, 10:50:57 am »

No, my character is not hungry, thirsty, or tired. Also, which is the dominant hand of a character? I only have a pick in my hands, and it is multigrasp.

The logic that tells a creature to eat, drink, or sleep will kick in shortly before the status effect will show in their info-screen, so you might not look hungry, but you might be. Or there might be something else keeping adv-fort from picking the plant. This might sound silly, but is the plant dead? Sometimes walking onto plants will kill them.

The dominant hand is chosen at random when a creature is created. To see which hand is dominant, drop everything then pick up something light enough to wield one-handed.

I'm not sure if holding your pick multi-grasp has any effect on adv-fort logic, so I can't comment on that.
nah I found out that you will trample over the plant before you can get the chance to grab the item and since you're standing on said item for periods of time(to do a job) the game runs a random blah to check if did you step on the food you wanted to pick. this happens in fort mode also but only if your gardener is really slow, or your dwarves have some raw code that steps out plants.
then there a case the plant is really a shrub and will grow into a tree thus you can't 'pick it up'.

Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Zivilin

  • Bay Watcher
  • Dwarven Science Division
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4948 on: December 08, 2013, 03:36:14 pm »

Apologies for intruding, I was wondering whether there is a way to ascertain which way a dwarf is facing using DFHack? I assume there must be some related variable which stores which way dwarves are facing, since they can be attacked from behind.
Logged
No signature

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4949 on: December 08, 2013, 03:37:31 pm »

No, AFAIK. It's pretty... kludgy as of now. I think this'll be improved as of next version.
Pages: 1 ... 328 329 [330] 331 332 ... 373