Pocket Plane Group Logo Wild Mage Additions
Welcome, Guest. Please login or register.
March 18, 2010, 01:59:05 AM

Login with username, password and session length
Search:     Advanced search
Banter V7 released! Grab from here.
131368 Posts in 13312 Topics by 3849 Members
Latest Member: Kilmor of Gelnor
* Home Help Search Login Register RSS feed
+  Pocket Plane Group
|-+  Friends and Neighbors
| |-+  Weimer Republic (WeiDU.org)
| | |-+  WeiDU (Moderators: weimer, the bigg)
| | | |-+  How to compile. Also, update your compiling environment.
« previous next »
Pages: [1] Go Down Reply Print
Author Topic: How to compile. Also, update your compiling environment.  (Read 3045 times)
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« on: June 14, 2007, 03:56:36 PM »
Reply with quote

Windows
For those who have already compiled WeiDU in the past:
OCaml 3.10 was released, it will depend on TK 8.4 rather than TK 8.3. The links bring you to the download pages. Once you've downloaded them, install ocaml in C:\ocaml and TK in the default directory. Delete tk83.dll from your work directory and put there tk84.dll from http://www.activestate.com/store/activetcl.

If you've never compiled WeiDU, instructions are available here.

Debian-based Linux
run as root:
Code:
apt-get install build-essential ocaml-native-compilers tk8.4-dev tk8.3-dev zip unzip upx tetex-extra hevea
I install tk8.3 and 8.4 because Debian Stable and Testing currently don't ship Ocaml 3.10. You can get it from http://ocaml.org if you have 3.09 installed.

After that, unzip some version of WeiDU-Linux and the current source version in the same directory; cd to the WeiDU directory, edit your files, and run `make linux_zip'.

Mac OSX
instructions for compiling are available here.
To update OCaml: run steps 2 to 10 from those instructions.
« Last Edit: September 12, 2007, 08:53:06 AM by the bigg » Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
Taimon
Planewalker
*****
Offline Offline

Posts: 316


« Reply #1 on: March 29, 2008, 02:39:18 PM »
Reply with quote

Just wanted to add that in newer WeiDU versions you will also need Elkhound.
I got the (probably outdated) tarball from the berkeley site.
It refused to compile on my debian box, but I was able to build it after fixing some perl script. (Probably has something to do with a newer flex version.)
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #2 on: March 29, 2008, 09:41:55 PM »
Reply with quote

Just wanted to add that in newer WeiDU versions you will also need Elkhound.
I got the (probably outdated) tarball from the berkeley site.
It refused to compile on my debian box, but I was able to build it after fixing some perl script. (Probably has something to do with a newer flex version.)
I use the berkley.edu version as well.

For me, `./configure && make && sudo cp elkhound/elkhound /usr/bin' worked out of the box.

EDIT: also, yeah, I really should mention elkhound somewhere.
« Last Edit: March 29, 2008, 09:47:13 PM by the bigg » Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
Taimon
Planewalker
*****
Offline Offline

Posts: 316


« Reply #3 on: March 30, 2008, 02:25:58 AM »
Reply with quote

I used flex 2.5.34.

smbase/run_flex.pl launches flex and modifies the generated file after that. (putting some #ifndef's in)
Unfortunately it deletes some flex-generated end comment (*/) during this modification that.
I just mention it here, so if anyone ever has the same issue, he knows where to look at.
Logged
Taimon
Planewalker
*****
Offline Offline

Posts: 316


« Reply #4 on: May 28, 2008, 04:46:46 AM »
Reply with quote

How did you compile elkhound on windows? Cygwin + gcc?
I ended up using cygwin + mingw32, but had to edit another file (ckheap.h).
Cross-compile from linux did not work for some reason. Linker did not recognize the symbols in libsmbase.a. No idea.

Oh, and ocamlopt.opt.exe (3.10.2) did crash on trealparser.ml. Smiley
(But ocamlopt.exe works.)
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #5 on: May 28, 2008, 04:57:43 AM »
Reply with quote

How did you compile elkhound on windows? Cygwin + gcc?
Yup.

Quote
Oh, and ocamlopt.opt.exe (3.10.2) did crash on trealparser.ml. Smiley
(But ocamlopt.exe works.)
Don't get me started on my hate speech against french people, PLZ. Suffice to say, I think that saying "it's a feature, not a bug" should be punishable by death in a modern country.
Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
Mike1072
Planewalker
*****
Offline Offline

Gender: Male
Posts: 122



« Reply #6 on: January 23, 2009, 12:51:00 AM »
Reply with quote

If you've never compiled WeiDU, instructions are available here.
Link is broken.
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #7 on: January 23, 2009, 05:05:45 AM »
Reply with quote

I've lost the file and it isn't on archive.org. Does anyone have a copy?
Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
Mike1072
Planewalker
*****
Offline Offline

Gender: Male
Posts: 122



« Reply #8 on: January 23, 2009, 05:43:41 AM »
Reply with quote

Oh, snap.

http://web.archive.org/web/20070701033342/http://www.weidu.org/users/thebigg/compile.html

Will give it a go tomorrow, I think.
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #9 on: January 23, 2009, 06:47:37 AM »
Reply with quote

Doesn't show up if I use the 'resurrect this page' Firefox extension. Guess it's because of /~thebigg/ vs. /users/thebigg/.
That file is outdated, though - it doesn't describe installing elkhound  Sad
Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #10 on: January 23, 2009, 07:27:21 AM »
Reply with quote

Fixed the broken link, updated with references to elkhound (yes, I'm sure a certain bit in those instructions is TheDailyWTF worthy).
Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
erik
Guest
« Reply #11 on: January 23, 2009, 02:50:06 PM »
Reply with quote

Yay. Modern ubuntu has ocaml 3.10.2 packages. Smiley
Logged
Mike1072
Planewalker
*****
Offline Offline

Gender: Male
Posts: 122



« Reply #12 on: January 23, 2009, 06:58:09 PM »
Reply with quote

Fixed the broken link, updated with references to elkhound (yes, I'm sure a certain bit in those instructions is TheDailyWTF worthy).
Thanks for updating it.  I think I've managed to compile it successfully.  I had to do a couple things differently, though.

In this section:
Quote
- Fix these file errors (in all cases, by closing the comments with a */ like you'd do in .tp2, .d etc.).
      C:\cygwin\home\username\elsa-2005.08.22b\ast\agramlex.yy.cc, line 1229
      C:\cygwin\home\username\elsa-2005.08.22b\ elkhound/gramlex.yy.cc, line 1366
- Once you fixed these files, continue running the following in Cygwin:
    for a in smbase ast elkhound; do cd $a; ./configure; cd ..; done
    for a in smbase ast elkhound; do cd $a; ./make; cd ..; done
    cp elkhound/elkhound.exe /usr/bin

The files with the errors in them didn't exist before make was executed, so I had to do this instead:
Quote
cd smbase
./configure
make
cd ../ast
./configure
make

(error gets reported here - need to fix agramlex.yy.cc, line 1229)

Fixed it:
Quote
/* The contents of this function are C++ specific, so the () macro is not used.
*/
#ifndef NO_YYFLEXLEXER_METHODS
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
{

Then continued:

Quote
make
cd ../elkhound
./configure
make

(error gets reported here - need to fix gramlex.yy.cc, line 1366, do same as above)
make
cp elkhound.exe /usr/bin


Then I felt pretty good, but I ran into an issue when running make windows_zip in the WeiDU directory.  I got some error basically telling me that flexlink didn't exist.  I made sure I'd installed flex, and when I couldn't find anything more, I Googled it and came up with this page.  Grabbing the binary package there made it work.

Now I just need to make the docs...

Edit: Woot, can make docs, too.
« Last Edit: January 23, 2009, 09:46:18 PM by Mike1072 » Logged
Taimon
Planewalker
*****
Offline Offline

Posts: 316


« Reply #13 on: January 24, 2009, 06:45:37 AM »
Reply with quote

By the way, this was my modification to smbase/run-flex.pl to get around the grammar issue:
Code:
--- elsa-2005.08.22b/smbase/run-flex.pl
+++ elsa-2005.08.22b/smbase/run-flex.pl
@@ -220,12 +220,9 @@
   }
 
   elsif ($state == 6) {
-    if ($line =~ m/^yyFlexLexer::yyFlexLexer/) {
+    if ($lines[$i+1] =~ m/^yyFlexLexer::yyFlexLexer/) {
       $state++;
-      $i++;       # skip the '{' line, to keep #line numbers in sync
-      chomp($line);
-      print OUT ("#ifndef NO_YYFLEXLEXER_METHODS\n" .
-                 $line . " {\n");
+      print OUT ("#ifndef NO_YYFLEXLEXER_METHODS\n");
       next;
     }
   }
Logged
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3195


« Reply #14 on: January 26, 2009, 04:25:32 PM »
Reply with quote

(a bit late) uploaded a fixed version of elkhound to the weidu.org host. Taimon, you posted a reversed patch  Wink
Logged

Please do not contact me for assistance in using BGT, BP, any other of the 'large mods', or a mod I didn't write or contribute to. I'm not your paid support staff, so I'd suggest you to direct your help questions to the forum relative to the mod you're playing.<br /><br />Thanks for your cooperation.
Taimon
Planewalker
*****
Offline Offline

Posts: 316


« Reply #15 on: January 27, 2009, 04:48:51 AM »
Reply with quote

Oh... I knew it looked a bit odd.  Grin
Logged
Pages: [1] Go Up Reply Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!