View Issue Details

IDProjectCategoryView StatusLast Update
0003068unrealinstallingpublic2007-04-24 05:50
ReporterBock Assigned Tostskeeps 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformallOS*nixOS Versionall
Product Version3.2.5 
Summary0003068: error on 'make install' if path to binary not exist.
Description/usr/bin/install -m 0700 -d /usr/local/ircd-test/etc
/usr/bin/install -m 0700 src/ircd /usr/local/ircd-test/bin/ircd
/usr/bin/install: cannot create regular file `/usr/local/ircd-test/bin/ircd': No such file or directory
make: *** [install] Error 1

I think that in Makefile.in:
install: all
    $(INSTALL) -m 0700 -d $(IRCDDIR)
    $(INSTALL) -m 0700 src/ircd $(BINDIR)
    $(INSTALL) -m 0700 -d $(IRCDDIR)/networks
    $(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
    $(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks

must be:
install: all
    $(INSTALL) -m 0700 -d $(IRCDDIR)
    $(INSTALL) -m 0700 -d $(BINDIR)
    $(INSTALL) -m 0700 src/ircd $(BINDIR)
    $(INSTALL) -m 0700 -d $(IRCDDIR)/networks
    $(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
    $(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks

And make will not give error if BINDIR doesn't exist.
TagsNo tags attached.
3rd party modules

Relationships

has duplicate 0003091 resolvedstskeeps Problems when specifying different directory for binary in Config 

Activities

Bock

2006-09-24 05:59

reporter   ~0012421

heh. I'm wrong with patch, but trouble is exist. :]

Bock

2006-09-25 06:34

reporter   ~0012432

Last edited: 2006-09-25 06:35

aahh, just man install.. :-\

Makefile.in:
install: all
    $(INSTALL) -m 0700 -d $(IRCDDIR)
    $(INSTALL) -m 0700 -D src/ircd $(BINDIR)
    $(INSTALL) -m 0700 -d $(IRCDDIR)/networks
    $(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
    $(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks

aquanight

2006-09-26 20:04

reporter   ~0012446

The problem with -d is $(BINDIR) is most likely not be an actual directory. It's the answer to the ./Config question: "What is the path to the ircd binary including the name of the binary?" Thus the value is generally going to be something like:
/home/user/unreal/sourcedir/src/ircd
/home/user/ircd/ircd
/home/user/unreal/bin/ircd
/usr/(possibly local/)sbin/unrealircd (in rare cases)
...etc

Also, -D seems to be specific to GNU install, and thus can't be garunteed to work on any other implementation of install.

I'm thinking the best (albeit slightly ugly) option is to use install -d (which creates $(BINDIR) as a directory), then follow with rmdir, so that everything up to the ircd name exists, but this doesn't work if the ircd name is given as just something like /home/user/unreal/bin/ but since the Config question asks for the binary name, it's probably safe to assume that's how $(BINDIR) will look like.

What might also work is have Config break up the given path-and-filename into seperate parts, something like (not sure if it works on pure /bin/sh):
# $BINDIR is what we just read:
BINFILE=`basename ${BINDIR}` # <- don't need to save this really
BINPATH=${BINDIR%%${BINFILE}}
Then one could just $(INSTALL) -m 0700 -d $(BINPATH); $(INSTALL) -m 0700 src/ircd $(BINDIR)

Bock

2006-09-27 04:37

reporter   ~0012448

Huh. Maybe simple do:
BINPATH=`dirname ${BINDIR}`

 $(INSTALL) -m 0700 -d $(BINPATH);
 $(INSTALL) -m 0700 src/ircd $(BINDIR)

? :P

aquanight

2006-09-28 16:32

reporter   ~0012459

Last edited: 2006-09-28 16:37

Yeah guess dirname works too. Though really only if we can assume that it (and same for basename) is available on every system :P .

(Side note: I notice we don't even have an "install" target at all for win32? Though such a thing would certainly have to wait for a better config deal.)

Bock

2006-09-29 00:29

reporter   ~0012461

imo for win32 we don't needed to have "make install". Who compiled self, he can do correct src\win32\unrealinst.iss (like me :P). And Makefile.in don't used by win32, only makefile.win32

Bock

2007-04-16 04:48

reporter   ~0013448

*bump* :P

stskeeps

2007-04-19 02:49

reporter   ~0013578

0003091 has patch. Would someone test it?

stskeeps

2007-04-24 05:50

reporter   ~0013657

Fixed in referred bug.

Issue History

Date Modified Username Field Change
2006-09-24 05:15 Bock New Issue
2006-09-24 05:59 Bock Note Added: 0012421
2006-09-25 06:34 Bock Note Added: 0012432
2006-09-25 06:35 Bock Note Edited: 0012432
2006-09-26 20:04 aquanight Note Added: 0012446
2006-09-27 04:37 Bock Note Added: 0012448
2006-09-28 16:32 aquanight Note Added: 0012459
2006-09-28 16:37 aquanight Note Edited: 0012459
2006-09-29 00:29 Bock Note Added: 0012461
2007-04-16 04:48 Bock Note Added: 0013448
2007-04-16 10:39 stskeeps Status new => acknowledged
2007-04-19 02:48 stskeeps Relationship added has duplicate 0003091
2007-04-19 02:49 stskeeps Note Added: 0013578
2007-04-24 05:50 stskeeps Status acknowledged => resolved
2007-04-24 05:50 stskeeps Resolution open => fixed
2007-04-24 05:50 stskeeps Assigned To => stskeeps
2007-04-24 05:50 stskeeps Note Added: 0013657