Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#438 closed defect (fixed)

clean target removes generated setup-api DISTFILEs

Reported by: cinch Owned by:
Priority: minor Milestone: 4.9.0
Component: build system Version: 4.6.x
Keywords: make Cc:
Estimated difficulty:

Description

i'm trying to compile chicken on debian testing.
i found a small bug that happens with a "make PLATFORM=linux
PREFIX=/opt install":

gcc -L. chicken-profile.o -o chicken-profile \

-lchicken -Wl,-R"." -lm -ldl

gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES
-I. -I./ -fPIC -DPIC \

-c -Os -fomit-frame-pointer csc.c -o csc.o

gcc -L. csc.o -o csc -lchicken -Wl,-R"." -lm -ldl
chicken setup-api.scm -optimize-level 2 -include-path . -include-path
./ -inline -ignore-repository -no-warnings -feature chicken-compile-shared -dynamic -emit-import-library setup-api \

-output-file setup-api.c

make[1]: chicken: Command not found
make[1]: * [setup-api.c] Error 127
make[1]: Leaving directory `/home/david/src/chicken-4.6.0'
make:
* [install] Error 2

in rules.make on line 917 it's calling $(CHICKEN) and there it says "chicken" isn't found.

if i set the PATH to include the current directory it works.
export PATH=$PATH:.


This is a bug report generated by chicken-bug(1).

Date: Sat Dec 4 18:26:44 2010

User information: ("david" "x" 1000 1000 "david,"
"/home/david" "/bin/bash")

Host information:

machine type: x86-64
software type: unix
software version: linux
build platform: gnu

CHICKEN version is:
Version 4.6.0
linux-unix-gnu-x86-64 [ 64bit manyargs ptables ]
compiled 2010-12-04 on mango (Linux)

Attachments (1)

cleaning-targets-fix.patch (992 bytes) - added by sjamaan 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by sjamaan

I'm afraid you misunderstood the cause of the error. According to the output you pasted, it is trying to build setup-api.c

setup-api.c is built from setup-api.scm using "chicken", which is assumed to be already installed in a standard location where PATH can find it. However, setup-api.c is part of the release tarball so that it can be built without having a bootstrap compiler preinstalled.

I just checked and noticed that "make clean" incorrectly removes the setup-api.c file, so perhaps that's what went wrong.

The git log seems to indicate that revision b3fd772a654adfbc9ba633b142e379f7070f62f0 added setup-api.c and setup-download.c to the "clean" target. I think that's incorrect; they should be listed under the "spotless" target, instead. Since that target only lists DISTFILES, I guess the actual bug is that setup-api and setup-downloads are missing from DISTFILES.

Here's a patch to shuffle around the dependencies so the proper generated files are in DISTFILES; please try if this fixes the problem.

Changed 10 years ago by sjamaan

Attachment: cleaning-targets-fix.patch added

comment:2 Changed 10 years ago by sjamaan

Someone should change the title of this ticket to "clean target removes generated setup-api DISTFILEs" or something

comment:3 Changed 10 years ago by cinch

Summary: make install assumes PATH has the current directoryclean target removes generated setup-api DISTFILEs

comment:4 Changed 10 years ago by cinch

Resolution: fixed
Status: newclosed

i tried various combinations of make install, make uninstall, make clean and make install and it worked on the git version.

it's kinda hard to test this with the patch, since in order to build the dev version, chicken is expected in the path (or in the CHICKEN var).

i'll change this to fixed.

comment:5 Changed 10 years ago by felix winkelmann

Patch applied, thanks, Peter.

comment:6 Changed 9 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:7 Changed 8 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.