Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 Jul 2014, 16:49
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
self control build errors
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
morgonzola


Joined: 21 Apr 2010
Posts: 160
Location: Los Angeles, CA

PostPosted: Mon 08 Nov 2010, 15:56    Post subject:  self control build errors
Subject description: im a little lost as what i need to do
 

ok so the reason why i compiled that version of perl is because i wanted to build the program self control and it uses perl i guess.

so i got the program
read the readme
installed the Build module from CPAN.org
installed the YAML module also (these two were not in the readme but it told me that they didn't exist so i installed them)
it generated a Build.PL and i then ran ./Build
then it told me
Code:
# cd /mnt/home/selfcontrol-0.9
# ./Build test
t/00-load.t ......... 1/4 # Testing SelfControl 0.9, Perl 5.008008, /usr/bin/perl5.8.8
t/00-load.t ......... ok   
t/01-os.t ........... 1/3
#   Failed test 'Have 'at' in $PATH'
#   in t/01-os.t at line 16.
# Looks like you failed 1 test of 3.
t/01-os.t ........... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/02-selfcontrol.t .. You tried to run a test without a plan!  Gotta have a plan. at /usr/lib/perl5/5.8.8/Test/More.pm line 263
# Looks like your test died before it could output anything.
t/02-selfcontrol.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/03-atq.t .......... Useless use of a constant in void context at t/03-atq.t line 7.
You tried to run a test without a plan!  Gotta have a plan. at /usr/lib/perl5/5.8.8/Test/More.pm line 374
# Looks like your test died before it could output anything.
t/03-atq.t .......... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/boilerplate.t ..... ok   
t/manifest.t ........ skipped: Author tests not required for installation
t/pod-coverage.t .... skipped: Test::Pod::Coverage 1.08 required for testing POD coverage
t/pod.t ............. skipped: Test::Pod 1.22 required for testing POD

Test Summary Report
-------------------
t/01-os.t         (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t/02-selfcontrol.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
t/03-atq.t        (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
t/boilerplate.t   (Wstat: 0 Tests: 6 Failed: 0)
  TODO passed:   1, 3, 5
Files=8, Tests=13,  2 wallclock secs ( 0.31 usr  0.05 sys +  1.76 cusr  0.21 csys =  2.33 CPU)
Result: FAIL
Failed 3/8 test programs. 1/13 subtests failed.
#


so on the other errors i kinda decoded what i needed to do in order to get to the next part but can someone give me a clue as to what i did wrong? obviosly i "You tried to run a test without a plan! Gotta have a plan" Laughing
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4278

PostPosted: Mon 08 Nov 2010, 18:06    Post subject:  

You are missing the command "at"
http://linux.die.net/man/1/at

"at" seems to be similar to cron (which is more widespread and even part of busybox)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
morgonzola


Joined: 21 Apr 2010
Posts: 160
Location: Los Angeles, CA

PostPosted: Mon 08 Nov 2010, 21:05    Post subject:  

ok this might get a little comlicated
Shocked

so i found the "at" command and downloaded source

but when i tried to compile it said
Code:
gcc -c -O2 -g -Wall -DHAVE_CONFIG_H -DVERSION=\"3.1.9\" -DETCDIR=\"/etc\" -DLOADAVG_MX=0.8 -DDAEMON_USERNAME=\"daemon\" -DDAEMON_GROUPNAME=\"daemon\" -DLFILE=\"/var/spool/cron/atjobs/.SEQ\" -Wall atd.c
atd.c:498:2: error: #error "No mail command specified."
make: *** [atd.o] Error 1


ok so i see the "no mail command specified" and i looked up the error on google and after alot of searching i found that i need mailutils

so i got the source of that and now im stuck
i did configure and at the end of configure it says
Code:
config.status: error: cannot find input file: doc/rfc/Makefile.in

then when i do make it says
Code:
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory `/initrd/mnt/dev_save/mailutils-1.2'
Making all in include
make[2]: Entering directory `/initrd/mnt/dev_save/mailutils-1.2/include'
make[2]: *** No rule to make target `all'.  Stop.
make[2]: Leaving directory `/initrd/mnt/dev_save/mailutils-1.2/include'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/initrd/mnt/dev_save/mailutils-1.2'
make: *** [all] Error 2


ok so i am lost now Sad why isnt it creating the makefile. i see makefiles in the folder do i need to tell it to use one of those?
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4278

PostPosted: Mon 08 Nov 2010, 22:19    Post subject:  

usually when I get to that point I just make a symlink to something similar just to get it to build - autotools is always a lesson in frustration

... or find the line in configure that tells it to exit and replace all the exits with echos and give it a run


anyhow look in atd.c line 498-ish you may be able to just use defaultmail
(you didn't post the leaving directory... or I would say what dir that atd.c was in)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
morgonzola


Joined: 21 Apr 2010
Posts: 160
Location: Los Angeles, CA

PostPosted: Tue 09 Nov 2010, 13:10    Post subject:  

ok thank you for the help however im a little confused as to how to make it use defaultmail

i found atd.c (it was in /mnt/home/at-3.1.10.2 Wink )

then i opened with geany and found the line you pointed out however, i dont really know what to change.

here is the chunk around it
Code:
if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) {

   PRIV_START

       if (initgroups(pentry->pw_name, pentry->pw_gid))
      perr("Cannot delete saved userids");

       if (setgid(gid) < 0)
      perr("Cannot change group");

       if (setuid(uid) < 0)
      perr("Cannot set user id");

       chdir ("/");

#if defined(SENDMAIL)
       execl(SENDMAIL, "sendmail", mailname, (char *) NULL);
#else
#error      "No mail command specified."
#endif
       perr("Exec failed for mail command");

   PRIV_END
    }
    exit(EXIT_SUCCESS);


now would i want to change
Code:
 if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) {

to
Code:
 if (((defaultmail != -1) && (buf.st_size != size)) || (defaultmail == 1)) {


well i tried this but then it told me
Code:
gcc -c -O2 -g -Wall -DHAVE_CONFIG_H -DVERSION=\"3.1.9\" -DETCDIR=\"/etc\" -DLOADAVG_MX=0.8 -DDAEMON_USERNAME=\"daemon\" -DDAEMON_GROUPNAME=\"daemon\" -DLFILE=\"/var/spool/cron/atjobs/.SEQ\" -Wall atd.c
atd.c: In function 'run_file':
atd.c:480: error: 'defaultemail' undeclared (first use in this function)
atd.c:480: error: (Each undeclared identifier is reported only once
atd.c:480: error: for each function it appears in.)
atd.c:498:2: error: #error "No mail command specified."
make: *** [atd.o] Error 1

so maybe i did something wrong so i double checked and found that in pupeee, its called defaultemail? (yes the e is correct)
so i tried that but still same error.

next i tried modifying this line
Code:
#if defined(SENDMAIL)
       execl(SENDMAIL, "sendmail", mailname, (char *) NULL);

to
Code:
#if defined(SENDMAIL)
       execl([b]defaultmail[/b], "sendmail", mailname, (char *) NULL);
(i put the change in bold here only)

but that had no effect on anything and just gave me the first error about no mail command specified.

so then i tried to stymlink default mail into the at-3.1.10.2 directory but that didn't have any effect either

should i be wording defaultmail differently in the code or do i need to actually go through and compile that mailutils package i downloaded.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 09 Nov 2010, 22:51    Post subject:  

morgonzola wrote:


Code:

atd.c:480: error: 'defaultemail' undeclared (first use in this function)


so maybe i did something wrong so i double checked and found that in pupeee, its called defaultemail? (yes the e is correct)
so i tried that but still same error.


The error means that variable "defaultemail" needs to be declared, since it's being used somewhere. $defaultemail = '.....'
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0730s ][ Queries: 11 (0.0030s) ][ GZIP on ]