Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » LoP Codebase » Can't Compile?
Forum Rules | Mark all | Recent Posts

Can't Compile?
< Newer Topic :: Older Topic > Cannot compile LoP

Pages:<< prev 1 next >>
Post is unread #1 May 23, 2009, 6:57 pm
Go to the top of the page
Go to the bottom of the page

Zecred
Fledgling
GroupMembers
Posts11
JoinedMay 22, 2009

I "made" the code in Ubuntu, and it made all the o-files (It did not, however, echo "Mud Compiled." when it finished, so maybe something is problematic there?
Anyway, I tried to "nohup ./startup &" and this is what it returned:

zecred@zecred-desktop:~$ cd /media/disk/SoA/SoA/src
zecred@zecred-desktop:/media/disk/SoA/SoA/src$ nohup ./startup &
nohup: ignoring input and appending output to `nohup.out'
nohup: cannot run command `./startup': No such file or directory
[1] 6538
[1]+ Exit 127 nohup ./startup
zecred@zecred-desktop:/media/disk/SoA/SoA/src$

Hope you all can make something of it and get back to me. Thanks!

-Zecred
       
Post is unread #2 May 23, 2009, 7:22 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

You might try using ls to verify that the script startup is in that folder, and if it's not, check the folder above that one for it instead.
       
Post is unread #3 May 23, 2009, 8:12 pm
Go to the top of the page
Go to the bottom of the page

Zecred
Fledgling
GroupMembers
Posts11
JoinedMay 22, 2009

It's in there, I checked. But maybe it's not recognizing it? I'll change the filename to read "./startup". Think that might help?
       
Post is unread #4 May 23, 2009, 8:21 pm
Go to the top of the page
Go to the bottom of the page

Legaeldan
Fledgling
GroupMembers
Posts10
JoinedMay 18, 2009

I had this exact problem, you need to get the c shell

go to terminal, and type these exact lines

sudo apt-get install tcsh

and

sudo apt-get install csh

that should sort it all out :biggrin:
       
Post is unread #5 May 24, 2009, 1:34 am   Last edited May 24, 2009, 1:35 am by Conner
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Zecred said:

It's in there, I checked. But maybe it's not recognizing it? I'll change the filename to read "./startup". Think that might help?

Nope, that should definitely not help... Legaeldan's solution might work, if you somehow missed installing tcsh or csh, but it could also just be a permissions thing if the file's there and it's not finding it. You really want startup to have rwxrwx--- perms most likely.
       
* #6 Sep 26, 2010, 6:46 pm
Go to the top of the page
Go to the bottom of the page

Zecred
Fledgling
GroupMembers
Posts11
JoinedMay 22, 2009

Hey, folks. I know this thread's been dead a while, but ever since I started this thread, there've been several revisions to the Lands Of Pabulum codebase, and now I'm having issues once again.


zecred@Ubuntu:~/Documents/LOP/src$ make all
make -s lop
Compiling o/comm.o....
comm.c: In function ‘bool can_use_path(CHAR_DATA*, const char*, const char*)’:
comm.c:2318: error: no matching function for call to ‘stat::stat(char [1024], stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&;)
comm.c: In function ‘bool exists_file(char*)’:
comm.c:3297: error: no matching function for call to ‘stat::stat(char*&, stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&;)
comm.c: In function ‘void remove_oldest_log()’:
comm.c:3329: error: no matching function for call to ‘stat::stat(char [4096], stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&;)
make[1]: *** [o/comm.o] Error 1
make: *** [all] Error 2

So, I'm kind of confused by this, as I've never encountered it before. I have the libraries I need (as far as I know, including the c shell and zlib-dev), but still it's having difficulties. If you awesome folks can make any sense of this and offer some tips, I'd be really appreciative. Thanks!

If you need any more info, let me know. Thanks for your time.
-Zecred
       
Post is unread #7 Sep 26, 2010, 6:49 pm
Go to the top of the page
Go to the bottom of the page

Zecred
Fledgling
GroupMembers
Posts11
JoinedMay 22, 2009

Darn the smiley thing. Here.


zavor@Zavor-Ubuntu:~/Documents/LOP/src$ make all
make -s lop
Compiling o/comm.o....
comm.c: In function ‘bool can_use_path(CHAR_DATA*, const char*, const char*)’:
comm.c:2318: error: no matching function for call to ‘stat::stat(char [1024], stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&)
comm.c: In function ‘bool exists_file(char*)’:
comm.c:3297: error: no matching function for call to ‘stat::stat(char*&, stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&)
comm.c: In function ‘void remove_oldest_log()’:
comm.c:3329: error: no matching function for call to ‘stat::stat(char [4096], stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&)
make[1]: *** [o/comm.o] Error 1
make: *** [all] Error 2
       
Post is unread #8 Sep 27, 2010, 3:02 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Zecred said:

Darn the smiley thing. Here.

Well, your errors look like they've got to do with the const thing to me which is beyond my knowledges, but the smiley thing I can help with. Aside from the fact that we all know a ;) is a semicolon followed by a closing parenthesis, if you use the code tag ([ code ] then your pasted data followed by [ /code ]) the forum should ignore the smiley opportunities. ;)
       
Post is unread #9 Oct 1, 2010, 3:30 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005


comm.c:3297: error: no matching function for call to ‘stat::stat(char*&, stat*)’
//usr/include/bits/stat.h:47: note: candidates are: stat::stat()
//usr/include/bits/stat.h:47: note: stat::stat(const stat&;)

Well without having the system to test things out on it is hard to say, but it looks like it uses stat differently then most. Hopefully someone has a bit more experience with that system and can shed some light on the changes etc.... Just by the looks of it though considering I don't see anything about it complaining in other places where stat are used that it might just need an include added to the file.
Try adding this around the other includes in comm.c
#include <sys/stat.h>

       
Post is unread #10 Oct 1, 2010, 3:59 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

What's the can_use_path() function look like?
       
Post is unread #11 Oct 1, 2010, 4:10 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

bool can_use_path( CHAR_DATA *ch, const char *direct, const char *filename )
{
   char newfilename[1024];
   struct stat fst;

   /* Length restrictions */
   if( !filename || filename[0] == '\0' )
   {
      if( ch )
         send_to_char( "Empty filename is not valid.\r\n", ch );
      return false;
   }
   if( strlen( filename ) < 3 )
   {
      if( ch )
         ch_printf( ch, "Filename (%s) isn't long enough.\r\n", filename );
      return false;
   }

   /* Illegal characters */
   if( strstr( filename, ".." ) || strstr( filename, "/" ) || strstr( filename, "\\" ) )
   {
      if( ch )
         send_to_char( "A filename may not contain a '..', '/', or '\\' in it.\r\n", ch );
      return false;
   }

   /* If that filename is already being used lets not allow it now to be on the safe side */
   snprintf( newfilename, sizeof( newfilename ), "%s%s", direct, filename );
   if( stat( newfilename, &fst ) != -1 )
   {
      if( ch )
         ch_printf( ch, "The filename (%s) is already used.\r\n", filename );
      return false;
   }

   /* If we got here assume its valid */
   return true;
}

       
Post is unread #12 Oct 1, 2010, 5:36 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

In that case you've got it right.

#include <sys/stat.h>

Should fix the problem.
       
Post is unread #13 Oct 1, 2010, 11:23 pm
Go to the top of the page
Go to the bottom of the page

Zecred
Fledgling
GroupMembers
Posts11
JoinedMay 22, 2009

Yup, it's working perfectly. Remcon, might want to make that tiny fix in the source so that you don't have a bunch of confused compilers.

I appreciate the help. Thanks for your time!
       
Pages:<< prev 1 next >>