self control build errors

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
morgonzola
Posts: 161
Joined: Thu 22 Apr 2010, 03:14
Location: Los Angeles, CA

self control build errors

#1 Post by morgonzola »

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: Select all

# 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" :lol:

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

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)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
morgonzola
Posts: 161
Joined: Thu 22 Apr 2010, 03:14
Location: Los Angeles, CA

#3 Post by morgonzola »

ok this might get a little comlicated
:shock:

so i found the "at" command and downloaded source

but when i tried to compile it said

Code: Select all

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: Select all

config.status: error: cannot find input file: doc/rfc/Makefile.in
then when i do make it says

Code: Select all

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 :( why isnt it creating the makefile. i see makefiles in the folder do i need to tell it to use one of those?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

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)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
morgonzola
Posts: 161
Joined: Thu 22 Apr 2010, 03:14
Location: Los Angeles, CA

#5 Post by morgonzola »

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: Select all

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: Select all

 if (((send_mail != -1) && (buf.st_size != size)) || (send_mail == 1)) {

to

Code: Select all

 if (((defaultmail != -1) && (buf.st_size != size)) || (defaultmail == 1)) {
well i tried this but then it told me

Code: Select all

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: Select all

#if defined(SENDMAIL)
	    execl(SENDMAIL, "sendmail", mailname, (char *) NULL);
to

Code: Select all

#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.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#6 Post by jpeps »

morgonzola wrote:

Code: Select all

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 = '.....'

Post Reply