Date: Tue, 22 Sep 1998 07:34:09 -0400 (EDT) From: "Woodchuck" <djv@bedford.net> To: ambein@mail.unixg.ubc.ca (Magnus) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ports won't build Message-ID: <199809221134.HAA22323@lucy.bedford.net> In-Reply-To: <E0zKbEf-0002ss-00@mail.unixg.ubc.ca> from Magnus at "Sep 19, 98 09:43:37 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Magnus wrote: > Dear Tech supporters, > > I realize your time is valuable and you have thousands of questions > to answer daily. I try to keep it to two a day, and then only ones that have aged for 48 hours, interest me, and have been answered incorrectly, incompletely or ignored. > I managed to create a symbolic link between /usr/ports/distfiles > and /cdrom/ports/distfiles. I did this with the following procedure: No, you didn't; you tried to make links between *files* in /cdrom/p/d and files in /u/p/d . There's a difference. > # bash > # mount -t cd9660 /dev/matcd0a /cdrom > # cd /cdrom/ports/distfiles > # mkdir -p /usr/ports/distfiles This should be unnecessary ^^^^. > # for i in *; do > > ln -s $i /usr/ports/distfiles/$i > > done This will not create the proper links. If you do an ls -l for /usr/ports/distfiles/foo.tgz you will see something like stuff ..... foo.tgz --> foo.tgz I.e. the path part to the cdrom is lost. A correct script would have been: cd /usr/ports/distfiles for p in /cdrom/ports/distfiles/* do ln -s $p `basename $p` done Only I did it in /tmp: [root@castor /root]# cd /tmp [root@castor /tmp]# mkdir -p ports/distfiles [root@castor /tmp]# cd ports/distfiles/ [root@castor distfiles]# mount /cdrom [root@castor distfiles]# for p in /cdrom/ports/distfiles/* > do > ln -s $p `basename $p` > done [root@castor distfiles]# ll yaht* lrwxrwxrwx 1 root wheel - 40 Sep 22 07:00 yahtzee-src.tar.Z@ -> /cdrom/ports/distfiles/yahtzee-src.tar.Z Doing it your way: [root@castor distfiles]# rm * [root@castor distfiles]# cd /cdrom/ports/distfiles/ [root@castor distfiles]# for p in * > do > ln -s $p /tmp/ports/distfiles/$p > done [root@castor distfiles]# cd /tmp/ports/distfiles/ [root@castor distfiles]# ll yaht* lrwxrwxrwx 1 root wheel - 17 Sep 22 07:04 yahtzee-src.tar.Z@ -> yahtzee-src.tar.Z -------------------------------------------------------------- As Doug White points out in another post, /cdrom/ports/distfiles is included in the search by default, so the ln -s exercise won't get you much. It will, though, prevent the copying from /c/p/dis. to /u/p/dis., saving a tad of diskspace. I don't recommend this, however, until you are confident and more experienced in building ports, or are really short on diskspace. > # cd /usr/pots/editors/staroffice ports :) I hope this is a typo in your post :) > # make [or make install] When you're having trouble, building ports stepwise can be useful. make fetch and make build are nice steps; many ports can be tested before doing the "make install". > My problems percedes this command and I have tryed making numerous > other packages with very similar outputs, what follows looks like > this: > > >> StarOffice31-common.tar.gz doesn't seem to exist on this system. > >> Attempting to fetch from file: /cdrom/ports/distfiles//. > cp: /cdrom/ports/distfiles//StarOffice31-common.tar.gz: No such file > or directory I'll bet a cabbage that /usr/ports/distfiles did not have a link (broken or otherwise) to this file, because StarOffice is not on the cdrom #3; it's not "freeware", so this message doesn't surprise me. It's one of those things with licensing problems, I suppose. > >> Attempting to fetch from ftp [....] > >> Couldn't fetch it [....] Something went wrong, as Doug White says. that [....] held answers. It could be that StarOffice has upped its version number, and the port hasn't caught up yet. I can check on this if you wish. There are other possibilities why the fetch failed. Maybe the site was busy, down, or the net was clogged with Clinton gawkers. > >> Port manually into /usr/ports/distfiles/ and try again. > *** Error code 1 > > Stop. > *** Error code 1 > > Stop. > *** Error code 1 > > Stop. > # > > Is it just that I'm selecting packages that don't have the > source archived on the cds? Is it because some source is archived as maybe > .tgz not .tar.gz? Or is it that I need to link /usr/ports/ with No, unless the port is broken. Check in the port's high level Makefile for names of the tar archives it (thinks it) needs. > /cdrom/packages/? No. Packages are precompiled, ports are not. ------------------------------------------------------------------ Let's try to get things working for a simple case first. Try a port whose source is known to be present, and see what happens. First, get rid of those links you made, they'll cause trouble sooner or later. Probably sooner. [root@castor distfiles]# touch not-a-link [root@castor distfiles]# pwd /tmp/ports/distfiles [root@castor distfiles]# find -XP . -type l | xargs rm [root@castor distfiles]# ll total 35 drwxr-xr-x 2 root wheel - 34816 Sep 22 07:13 ./ drwxr-xr-x 3 root wheel - 512 Sep 22 06:59 ../ -rw-r--r-- 1 root wheel - 0 Sep 22 07:11 not-a-link A simple little port to try is rdate, under /usr/ports/sysutils. Having cleaned up /usr/ports/distfiles (no links), mount the #3 cdrom under /cdrom, cd /usr/ports/sysutils/rdate and type make build. You should see it 'build', but not install. (rdate is a utility to set your clock from another machine's clock). My output (running as root) for this looks like: [root@castor rdate]# make build >> rdate-1.0.tar.gz doesn't seem to exist on this system. >> Attempting to fetch from file:/cdrom/ports/distfiles//. >> Checksum OK for rdate-1.0.tar.gz. ===> Extracting for rdate-1.0 ===> Patching for rdate-1.0 ===> Configuring for rdate-1.0 ===> Building for rdate-1.0 gcc -Wall -O -o rdate rdate.c [root@castor rdate]# (If I had had your "bad" (x-->x) links it would have barfed badly -- see why those links are evil?) The output with your "bad" link is: [root@castor rdate]# ls -l /usr/ports/distfiles/rdate-1.0.tar.gz lrwxrwxrwx 1 root wheel 16 Sep 22 06:22 /usr/ports/distfiles/rdate-1.0.tar.gz -> rdate-1.0.tar.gz [root@castor rdate]# make build >> /usr/ports/distfiles//rdate-1.0.tar.gz is a broken symlink. >> Perhaps a filesystem (most likely a CD) isn't mounted? Perhaps not :) >> Please correct this problem and try again. *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. If the link was a "good" link, it would have worked: [root@castor distfiles]# ll rdate* lrwxrwxrwx 1 root wheel - 39 Sep 22 06:25 rdate-1.0.tar.gz@ -> /cdrom/ports/distfiles/rdate-1.0.tar.gz [root@castor distfiles]# cd /usr/ports/sysutils/rdate/ [root@castor rdate]# make clean ===> Cleaning for rdate-1.0 [root@castor rdate]# make build >> Checksum OK for rdate-1.0.tar.gz. ===> Extracting for rdate-1.0 ===> Patching for rdate-1.0 ===> Configuring for rdate-1.0 ===> Building for rdate-1.0 gcc -Wall -O -o rdate rdate.c [root@castor rdate]# If it doesn't find the tar file on the mounted /cdrom: *) save /all/ screen output (don't edit it ... you might edit something important. also, people reading it will expect to see familiar stuff, even though it might be irrelevant.) *) ensure that the file /cdrom/distfiles/rdate-1.0.tar.gz exists $ ls -la /cdrom/distfiles/rdate-1.0.tar.gz -rw-r--r-- 1 root wheel - 2993 Jan 28 1998 /cdrom/distfiles/rdate-1.0.tar.gz $ *) also look at /cdrom/ports/distfiles/rdate-1.0.tar.gz $ ls -la /cdrom/ports/distfiles/rdate-1.0.tar.gz -rw-r--r-- 1 root wheel - 2993 Jan 28 1998 /cdrom/ports/distfiles/rdate-1.0.tar.gz $ (/cdrom/ports/distfiles is a link --> /cdrom/distfiles , BTW) OK, now let's try it with a missing tar file, one that the machine will have to fetch from the 'net. [root@castor /tmp]# cd /usr/ports/distfiles/ [root@castor distfiles]# rm rdate* [root@castor distfiles]# cd /usr/ports/sysutils/rdate/ [root@castor rdate]# make clean ===> Cleaning for rdate-1.0 [root@castor rdate]# Insure that the machine has access to the 'net. Then: [root@castor rdate]# make fetch >> rdate-1.0.tar.gz doesn't seem to exist on this system. >> Attempting to fetch from http://www2.cons.org:8000/freebsd-distfiles/. Receiving rdate-1.0.tar.gz (2993 bytes): 100% 2993 bytes transfered in 0.9 seconds (3.18 Kbytes/s) [root@castor rdate]# make build >> Checksum OK for rdate-1.0.tar.gz. ===> Extracting for rdate-1.0 ===> Patching for rdate-1.0 ===> Configuring for rdate-1.0 ===> Building for rdate-1.0 gcc -Wall -O -o rdate rdate.c [root@castor rdate]# > I hope this desription is sufficient for a solution! I appreciate any > guidance you can offer me -- I've been at this for two weeks. Should have whistled sooner :-) One day's pain is enough, even for childbirth. All my remarks apply to a 2.2.6 RELEASE system, shell is bash 2.02.1(2). This is a "tested" reply ... all screen output is *really* screen output, no comments about behavior were "guessed" or gleaned from man pages. Dave -- Not affiliated with FreeBSD, Inc. or Walnut Creek, Inc. "Will hack for cabbages!" Every day is Groundhog Day! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809221134.HAA22323>