PDA

View Full Version : Stop in /usr/local/directadmin/custombuild/proftpd-1.3.1.



cbolt
06-30-2008, 11:36 PM
Hi

I decided to install custom apache on my FreeBSD 6 box but the build process exists with

*** Error code 1

Stop in /usr/local/directadmin/custombuild/proftpd-1.3.1.

I followed the instructions at http://files.directadmin.com/services/custombuild/1.1/

Everything is running OK, but I assume anything that was meant to be built after proftp was not. How can I find out what was remaining to be built when the script exited and finish the installation? (Obviously proftpd, but what else?)

Any help would be appreciated, I'm a noob at this.

smtalk
07-01-2008, 02:54 AM
Please post more error lines (~5-6).

cbolt
07-02-2008, 11:10 PM
Ahh, your right there are more errors above that I hadn't noticed, sorry.

Luckily I saved the terminal output.

The error occured while running # ./build update_data

There are hundreds of lines of output, without any errors untill it gets to here:

gcc: src/main.o: No such file or directory
gcc: src/timers.o: No such file or directory
gcc: src/sets.o: No such file or directory
gcc: src/pool.o: No such file or directory
gcc: src/table.o: No such file or directory
gcc: src/regexp.o: No such file or directory
gcc: src/dirtree.o: No such file or directory
gcc: src/support.o: No such file or directory
gcc: src/netaddr.o: No such file or directory
gcc: src/inet.o: No such file or directory
gcc: src/child.o: No such file or directory
gcc: src/parser.o: No such file or directory
gcc: src/log.o: No such file or directory
gcc: src/lastlog.o: No such file or directory
gcc: src/xferlog.o: No such file or directory
gcc: src/bindings.o: No such file or directory
gcc: src/netacl.o: No such file or directory
gcc: src/class.o: No such file or directory
gcc: src/scoreboard.o: No such file or directory
gcc: src/help.o: No such file or directory
gcc: src/feat.o: No such file or directory
gcc: src/netio.o: No such file or directory
gcc: src/response.o: No such file or directory
gcc: src/ident.o: No such file or directory
gcc: src/data.o: No such file or directory
gcc: src/modules.o: No such file or directory
gcc: src/display.o: No such file or directory
gcc: src/auth.o: No such file or directory
gcc: src/fsio.o: No such file or directory
gcc: src/mkhome.o: No such file or directory
gcc: src/ctrls.o: No such file or directory
gcc: src/event.o: No such file or directory
gcc: src/var.o: No such file or directory
gcc: src/trace.o: No such file or directory
gcc: src/utf8.o: No such file or directory
gcc: src/proctitle.o: No such file or directory
gcc: src/pidfile.o: No such file or directory
gcc: src/env.o: No such file or directory
gcc: modules/mod_core.o: No such file or directory
gcc: modules/mod_xfer.o: No such file or directory
gcc: modules/mod_auth_unix.o: No such file or directory
gcc: modules/mod_auth_file.o: No such file or directory
gcc: modules/mod_auth.o: No such file or directory
gcc: modules/mod_ls.o: No such file or directory
gcc: modules/mod_log.o: No such file or directory
gcc: modules/mod_site.o: No such file or directory
gcc: modules/mod_delay.o: No such file or directory
gcc: modules/mod_tls.o: No such file or directory
gcc: modules/mod_readme.o: No such file or directory
gcc: modules/mod_ratio.o: No such file or directory
gcc: modules/module_glue.o: No such file or directory
*** Error code 1

Stop in /usr/local/directadmin/custombuild/proftpd-1.3.1.

Seems like I'm missing some source files, any suggestions on where I should go to get them?

smtalk
07-03-2008, 02:39 AM
Yes, you are missing some files. I can take a look at your server for free if you want.

whisperyaxe8
07-14-2008, 03:04 PM
mmm i have the same problem, freeBSD 6.
Just checked and phpinfo says PHP5 and Apache 2, so i think it updated the most, and everything is working...

How to fix thisproblem ?

bjseiler
07-15-2008, 05:58 AM
FreeBSD 7 install this morning. Same problem.

chatwizrd
07-15-2008, 07:29 AM
Just install proftpd from ports.

cd /usr/ports/ftp/proftpd
make install clean
mv /usr/local/etc/proftpd.conf /usr/local/etc/proftpd.conf.bak
ln -s /etc/proftpd.conf /usr/local/etc/proftpd.conf

rm /usr/local/etc/rc.d/proftpd

pico /usr/local/etc/rc.d/proftpd

Add the following code to this file:




#!/bin/sh
# $Id: proftpd.init,v 1.2 2002/06/10 15:35:47 dude Exp $
#
# proftpd This shell script takes care of starting and stopping
# proftpd.
#
# chkconfig: - 80 30
# description: ProFTPD is an enhanced FTP server with a focus towards \
# simplicity, security, and ease of configuration. \
# It features a very Apache-like configuration syntax, \
# and a highly customizable server infrastructure, \
# including support for multiple 'virtual' FTP servers, \
# anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftp.conf
# pidfile: /var/run/proftpd.pid

# Source function library.
. /usr/local/etc/rc.d/functions

[ -x /usr/local/sbin/proftpd ] || exit 0

RETVAL=0

FTPSHUT=/usr/local/sbin/ftpshut
LOCK_FILE=/var/spool/lock/proftpd

start() {
echo -n "Starting proftpd: "
daemon /usr/local/sbin/proftpd
RETVAL=$?
if [ $RETVAL -eq 0 ] && touch $LOCK_FILE
then
echo -e "\t\t[ OK ]";
else
echo -e "\t\t[ FAILED ]";
fi
return $RETVAL
}

stop() {
echo -n "Shutting down proftpd: "
killall proftpd 2> /dev/null
RETVAL=$?
if [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
then
echo -e "\t\t[ OK ]";
else
echo -e "\t\t[ FAILED ]";
fi
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status proftpd
RETVAL=$?
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f $LOCK_FILE ]; then
stop
start
RETVAL=$?
fi
;;
reload)
echo -n "Re-reading proftpd configuration: "
killall -HUP proftpd 2> /dev/null
RETVAL=$?
if [ $RETVAL = 0 ]
then
echo -e "\t[ OK ]";
else
echo -e "\t[ FAILED ]";
fi
;;
*)
echo "Usage: proftpd {start|stop|restart|reload|condrestart|status}"
exit 1
esac

exit $RETVAL



chmod 755 /usr/local/etc/rc.d/proftpd

/usr/local/etc/rc.d/proftpd restart

DirectAdmin Support
07-15-2008, 12:59 PM
Hmm.. I tested the following on our FreeBSD build box but didn't have any issues:
cd /usr/local/directadmin/custombuild
./build update
./build proftpdYou may need to send us an email for us to figure it out.
https://www.directadmin.com/clients/safesubmit.php

John

bjseiler
07-15-2008, 01:08 PM
Is it FreeBSD 7?
What about when you do build all d?
Does your csh work on your FreeBSD 7 machine??

DirectAdmin Support
07-15-2008, 01:13 PM
I'm using /usr/local/bin/bash.. that may have something to do with it.

"./build all d' and "./build proftpd" should be the same with respects to proftpd.. but I'm going to try "all d" anyway. (not expecting to see differences).

Try bash though, type:

bash

then give it another try.
Also what is your output:

ls -la /bin/sh

Mine is just the sh binary whtout any links to any other shell.

John

bjseiler
07-15-2008, 01:15 PM
$ bash
bash: not found


$ ls -la /bin/sh
-r-xr-xr-x 1 root wheel 113180 Feb 24 11:50 /bin/sh

chatwizrd
07-15-2008, 01:29 PM
pkg_add -r bash

bjseiler
07-15-2008, 01:36 PM
Sorry. I was shamefully trying to piggy back on this thread (http://www.directadmin.com/forum/showthread.php?p=135286) to get an answer from someone. I apologize!

DirectAdmin Support
07-15-2008, 01:53 PM
Hello,

I've manged to duplicate this issue. When running "./build proftpd" the first time, I had no problems. When running it a 2nd time, it hit the error.
I ran:

./build clean

then ran the script again, and we have no error.
So it appears to be caused by the presence of the the extracted files.

I did it one more time, got the error but this time I chmod the files to root:wheel before doing the "make" and that fixed it.

So the issue is caused by the permissions on the files within the tar.gz... in more detail, likely the permissions on the files created by the compiler, and the permissions set onto those files as a result of the ownership of the directory they live in. This is a quirk of FreeBSD we've seen before.. like files created by apache if you created them as your own user, but created in a folder owned by apache.. rather unexpected, but it's how FreeBSD does it.

I've added a recursive chown on the directory directly after the tar.gz is extracted to fix it. I reran the "./build proftpd" after the fix 3 times, and no problems.

Thanks for the report.

John

Lem0nHead
07-21-2008, 10:57 PM
I'm still having this issue with FreeBSD

I checked the "build" I'm using, and it's not old... at least it has:
chown -R root:${ROOT_GRP} proftpd-${PROFTPD_VER}

but when I do:
cd proftpd-1.3.1
./configure
make
make install

is works correctly
very weird, since the build do basically that

pucky
02-08-2009, 12:08 PM
Hello,

I've manged to duplicate this issue. When running "./build proftpd" the first time, I had no problems. When running it a 2nd time, it hit the error.
I ran:

./build clean

then ran the script again, and we have no error.
So it appears to be caused by the presence of the the extracted files.

I did it one more time, got the error but this time I chmod the files to root:wheel before doing the "make" and that fixed it.

So the issue is caused by the permissions on the files within the tar.gz... in more detail, likely the permissions on the files created by the compiler, and the permissions set onto those files as a result of the ownership of the directory they live in. This is a quirk of FreeBSD we've seen before.. like files created by apache if you created them as your own user, but created in a folder owned by apache.. rather unexpected, but it's how FreeBSD does it.

I've added a recursive chown on the directory directly after the tar.gz is extracted to fix it. I reran the "./build proftpd" after the fix 3 times, and no problems.

Thanks for the report.

John

This still does not work on Freebsd. Im using CB 1.1 and tried upgrading profptd to 1.3.2

d-1.3.2/lib -lssl -lcrypto -lsupp -lcrypt -lutil
gcc -L./lib -static -o ftpcount utils/ftpcount.o utils/scoreboard.o utils/misc.o -lsupp -lcrypt -lutil
gcc: utils/ftpcount.o: No such file or directory
gcc: utils/scoreboard.o: No such file or directory
gcc: utils/misc.o: No such file or directory
*** Error code 1

Stop in /usr/local/directadmin/custombuild/proftpd-1.3.2.

*** The make has failed, do you want to try to make again? (y,n):
n

Ran ./build clean then ran it again. Still getting the same error.

The file in proftpd.1-3-2 are owned by root:wheel which seems correct btw.

pucky
02-08-2009, 12:31 PM
Also the RESTART option in DA does not work for proftpd. It kicks and error.

Stop and start work. Any fix?

pucky
02-08-2009, 12:32 PM
This still does not work on Freebsd. Im using CB 1.1 and tried upgrading profptd to 1.3.2

d-1.3.2/lib -lssl -lcrypto -lsupp -lcrypt -lutil
gcc -L./lib -static -o ftpcount utils/ftpcount.o utils/scoreboard.o utils/misc.o -lsupp -lcrypt -lutil
gcc: utils/ftpcount.o: No such file or directory
gcc: utils/scoreboard.o: No such file or directory
gcc: utils/misc.o: No such file or directory
*** Error code 1

Stop in /usr/local/directadmin/custombuild/proftpd-1.3.2.

*** The make has failed, do you want to try to make again? (y,n):
n

Ran ./build clean then ran it again. Still getting the same error.

The file in proftpd.1-3-2 are owned by root:wheel which seems correct btw.


Forget it! The installation of proftpd via Custombuild for Freebsd is completely foobard. I had to manually install it from the proftpd directory.

./configure
make
make install

DirectAdmin Support
02-08-2009, 11:46 PM
Hello,

Thanks for the info. After extensive debugging and head scratching, I found the issue to actually be with a combination of "make" and false assumptions made by the proftpd Makefile, for the given make. The configure line we use is fine.

The proftpd-1.3.2/Makefile has code such as this:
lib: include/buildstamp.h dummy
cd lib/ && $(MAKE) lib

src: include/buildstamp.h dummy
cd src/ && $(MAKE) srcthroughout with "cd" commands all over. This, as we know is the command that changes the current working directory of the current process.

The problem with the way they have it, based on the make that FreeBSD has (on some boxes, not others) is the level of persistance of the working directory for these commands. On some, each make command is treated as a sub type of process.. and the cd has no effect on the main "make". However, the problem relating to this issue is that the "cd" in fact changed the entire Makefile's working directory, so without doing a "cd .." afterwards, the process was working from the wrong location.

I dicovered the fix by chaning all cases of the cd to have an ending "cd ..", eg:
cd lib/ && $(MAKE) lib && cd ..In any case, the solution for us isn't to edit the Makefile itself (too messy to edit on the fly). I found that gmake handles the working directory of these sub processes differently.. in that the entire Makefile's path is not affected like it is for make.

I've updated the build scripts to use /usr/local/bin/gmake instead, for freebsd+proftpd.

I'm not sure if this is an error in design with the Makefile itself, or the functionality of the make program for this case. Either way gmake works better for the given case.

John

cbolt
02-09-2009, 01:31 PM
I just used Custom Build and it worked perfectly (FreeBSD 6).

scsi
02-09-2009, 02:18 PM
You can use the proftpd on freebsd from the ports system.

Code:



cd /usr/ports/ftp/proftpd
make install clean
rm -rf /usr/local/etc/proftpd.conf*
ln -s /usr/local/etc/proftpd.conf /etc/proftpd.conf
chmod 0 /usr/local/etc/rc.d/proftpd.sh