Opened 5 years ago

Closed 5 years ago

#17826 closed defect (fixed)

tor not make-jobs safe

Reported by: wiz Owned by:
Priority: Medium Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.2-alpha
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I just tried building tor from git (f3ed5ec0cac4719e249e629760756314d7cfecba) from scratch with 'make -j10' and got:

--- src/common/src_common_libor_testing_a-log.o ---
src/common/log.c:272:28: fatal error: micro-revision.i: No such file or directory

#include "micro-revision.i"


Seems there are some dependencies missing.

Child Tickets

Attachments (3)

Change History (16)

comment:1 Changed 5 years ago by teor

Milestone: Tor: 0.2.8.x-final

I've noticed this issue before on OS X (probably 10.9 at the time).

Please feel free to submit a patch that contains the missing dependencies.

comment:2 Changed 5 years ago by cypherpunks

Status: newneeds_review

comment:3 Changed 5 years ago by cypherpunks

Version: Tor: unspecifiedTor: 0.2.4.2-alpha

comment:4 Changed 5 years ago by nickm

Does this work with out-of-tree builds? It reverts a commit that says that it's necessary in order to fix out-of-tree builds.

FWICT the problem here is really that there are other object files besides log.o. Specifically, I believe that Makefile.in will now also potentially include:

  • src/common/log.obj
  • src/common/src_common_libor_testing_a-log.o
  • src/common/src_common_libor_testing_a-log.obj

comment:5 in reply to:  4 ; Changed 5 years ago by cypherpunks

Replying to nickm:

Does this work with out-of-tree builds?

It should work with out-of-tree builds because i only use those and it worked fine. Also make distcheck ran successfully.

It reverts a commit that says that it's necessary in order to fix out-of-tree builds.

The changes file of the reverted commit mentions something about under some circumstances but all i could find was ticket:6778#comment:3 which is about src/or/tor_main.c itself and not micro-revision.i.

FWICT the problem here is really that there are other object files besides log.o. Specifically, I believe that Makefile.in will now also potentially include:

  • src/common/log.obj
  • src/common/src_common_libor_testing_a-log.o
  • src/common/src_common_libor_testing_a-log.obj

These targets (expect for src/common/log.obj which i can't find in Makefile.in or Makefile) all have src/common/log.c as their prerequisite. With the patches this will make make search for rules with src/common/log.c as its target, find it, look at its prerequisite (which is micro-revision.i) and rebuild it.

BTW, the problem is reproducible by trying to make src/or/src_or_tor_cov-tor_main.o or make src/common/src_common_libor_testing_a-log.o on a fresh build (clean directory with only ./configure called). It won't build micro-revision.i. These patches fix the problem.

comment:6 Changed 5 years ago by nickm

Status: needs_reviewneeds_revision

I just applied these patches, rand "make distcheck", and got this:

clang: error: no such file or directory: 'src/common/log.c'
clang: error: no input files
make[2]: *** [src/common/log.o] Error 1
make[1]: *** [all] Error 2
make: *** [distcheck] Error 1

(on OSX).

comment:7 in reply to:  5 Changed 5 years ago by nickm

Replying to cypherpunks:

[...]

BTW, the problem is reproducible by trying to make src/or/src_or_tor_cov-tor_main.o or make src/common/src_common_libor_testing_a-log.o on a fresh build (clean directory with only ./configure called). It won't build micro-revision.i. These patches fix the problem.

I've tried to follow these instructions on OSX and Fedora, and they didn't reproduce the problem.

comment:8 Changed 5 years ago by nickm

wait, never mind. I did reproduce. I didn't follow the instructinos closely enough. :(

comment:9 Changed 5 years ago by nickm

Status: needs_revisionneeds_review

I've tried the other approach as branch 17826_redux in my public repository. Does it work for you? Unlike the patches above, it passes "make distcheck" for me.

comment:10 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Still looks good to me. Merging. Please reopen if it doesn't work for you.

comment:11 in reply to:  10 Changed 5 years ago by cypherpunks

Resolution: fixed
Status: closedreopened

Replying to nickm:

Still looks good to me. Merging. Please reopen if it doesn't work for you.

Sorry for the late response. After testing my patches with make distcheck again i got the same error message as in comment:6. Your fix solves that issue.

Reopening the ticket because your fix can be simplified by using the OBJEXT variable which is automatically adjusted to be o or obj, depending on the platform. A patch for this is coming.

Changed 5 years ago by cypherpunks

comment:12 Changed 5 years ago by cypherpunks

Status: reopenedneeds_review

The new patch has been tested with make distcheck.

comment:13 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

applied; thanks!

Note: See TracTickets for help on using tickets.