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

cbolt

Verified User
Joined
Feb 6, 2008
Messages
28
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.
 
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?
 
Yes, you are missing some files. I can take a look at your server for free if you want.
 
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 ?
 
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:

Code:
#!/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
 
Is it FreeBSD 7?
What about when you do build all d?
Does your csh work on your FreeBSD 7 machine??
 
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
 
$ bash
bash: not found


$ ls -la /bin/sh
-r-xr-xr-x 1 root wheel 113180 Feb 24 11:50 /bin/sh
 
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
 
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
 
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.
 
Also the RESTART option in DA does not work for proftpd. It kicks and error.

Stop and start work. Any fix?
 
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
 
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:
Code:
lib: include/buildstamp.h dummy
        cd lib/ && $(MAKE) lib

src: include/buildstamp.h dummy
        cd src/ && $(MAKE) src
throughout 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:
Code:
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
 
I just used Custom Build and it worked perfectly (FreeBSD 6).
 
Back
Top