Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6778 closed defect (fixed)

Out-of-tree builds broken

Reported by: ln5 Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.1-alpha
Severity: Keywords: build tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

make  all-am
  CC       src/common/address.o
  CC       src/common/compat.o
  CC       src/common/container.o
  CC       src/common/di_ops.o
  CC       src/common/log.o
  CC       src/common/memarea.o
  CC       src/common/mempool.o
  CC       src/common/procmon.o
  CC       src/common/util.o
  GEN      src/common/common_sha1.i
micro-revision.i: No such file or directory
  CC       src/common/util_codedigest.o
  AR       src/common/libor.a
  CC       src/common/aes.o
  CC       src/common/crypto.o
gcc: src/common/crypto.c: No such file or directory
gcc: No input files specified

The micro-revision.i issue is related to buildling SHA sums of lots of
files and store them in other files. The problem with this is that we
cd into a subdirectory and use makefile variables (in this case
noinst_HEADERS) which might refer to files with paths relative to the
top builddir:

    (cd "$(srcdir)" && "@SHA1SUM@" $(src_common_libor_SOURCES) $(src_common_libor_crypto_a_SOURCES) $(noinst_HEADERS)) | "@SED@" -n 's/^\(.*\)$$/"\1\\n"/p' > $@; \

Commit 90d1c857 moves micro-revision.i from src/or/ to the root of the
build directory. Might be related.

The missing src/common/crypto.c issue is related to
src/common/crypto.c not being prepended by the build directory. For a
comparison with tortls.c:

depbase=`echo src/common/crypto.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; gcc -DHAVE_CONFIG_H -I. -I../tor-master  -I../tor-master/src/common -Isrc/common -I../tor-master/src/or  -Isrc/or -DSHARE_DATADIR="\"/home/linus/usr/tor/share\""  -DLOCALSTATEDIR="\"/home/linus/usr/tor/var\""  -DBINDIR="\"/home/linus/usr/tor/bin\""  -I../tor-master/src/common -I/usr/local/include -I/usr/local/include  -g -I /usr/local/include/event2 -Wall -fno-strict-aliasing -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement -Wold-style-definition -Waddress -Wmissing-noreturn -Wstrict-overflow=1 -Wnormalized=id -Woverride-init -MT src/common/crypto.o -MD -MP -MF $depbase.Tpo -c -o src/common/crypto.o src/common/crypto.c && mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/common/tortls.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; gcc -DHAVE_CONFIG_H -I. -I../tor-master  -I../tor-master/src/common -Isrc/common -I../tor-master/src/or  -Isrc/or -DSHARE_DATADIR="\"/home/linus/usr/tor/share\""  -DLOCALSTATEDIR="\"/home/linus/usr/tor/var\""  -DBINDIR="\"/home/linus/usr/tor/bin\""  -I../tor-master/src/common -I/usr/local/include -I/usr/local/include  -g -I /usr/local/include/event2 -Wall -fno-strict-aliasing -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement -Wold-style-definition -Waddress -Wmissing-noreturn -Wstrict-overflow=1 -Wnormalized=id -Woverride-init -MT src/common/tortls.o -MD -MP -MF $depbase.Tpo -c -o src/common/tortls.o ../tor-master/src/common/tortls.c && mv -f $depbase.Tpo $depbase.Po

Hunting this down further unless someone knows off hand.

Child Tickets

Change History (10)

comment:1 Changed 7 years ago by nickm

Need more info. Just tried to reproduce; got a spurious

  GEN      src/common/common_sha1.i
micro-revision.i: No such file or directory

with an easy fix, but nothing about crypto.c.

What autoconf/automake do you have?

comment:2 Changed 7 years ago by nickm

Status: newneeds_review

Does "bug6778" in my public repository help at all?

comment:3 Changed 7 years ago by ln5

Status: needs_reviewneeds_revision

Helps some, but not all the way.

depbase=`echo src/or/tor_main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; gcc -DHAVE_CONFIG_H -I. -I../tor-master  -I../tor-master/src/common -Isrc/common -I../tor-master/src/or  -Isrc/or -DSHARE_DATADIR="\"/home/linus/usr/tor/share\""  -DLOCALSTATEDIR="\"/home/linus/usr/tor/var\""  -DBINDIR="\"/home/linus/usr/tor/bin\""  -I../tor-master/src/common -I/usr/local/include -I/usr/local/include  -g -I /usr/local/include/event2 -Wall -fno-strict-aliasing -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement -Wold-style-definition -Waddress -Wmissing-noreturn -Wstrict-overflow=1 -Wnormalized=id -Woverride-init -MT src/or/tor_main.o -MD -MP -MF $depbase.Tpo -c -o src/or/tor_main.o src/or/tor_main.c && mv -f $depbase.Tpo $depbase.Po
gcc: src/or/tor_main.c: No such file or directory

comment:4 Changed 7 years ago by nickm

Any better now?

comment:5 Changed 7 years ago by nickm

Status: needs_revisionneeds_review

comment:6 Changed 7 years ago by ln5

Works. Thanks!

comment:7 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Thanks; Merging!

comment:8 Changed 7 years ago by nickm

Milestone: Tor: 0.2.4.x-final

comment:9 Changed 7 years ago by nickm

Keywords: tor-client added

comment:10 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.