oracle / oracle/dtrace

build: issues with out-of-source (objdir=...)

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
189
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Out-of-source build (objdir=/whatever) would be useful for doing bits with cvise so it can work in parallel.

With /tmp on tmpfs:

$ cd $(mktemp -d) && make -C /home/sam/git/dtrace-utils/ objdir=$(pwd) -j1
[...]
AR: libcommon.a
AR: libport.a
AR: libproc.a
SHLINK: libdtrace.so
SHLINK: libproc-dlmlib.so
cp: cannot create hard link 'test/triggers/libproc-dlmlib.so.0.0.0' to '/tmp/tmp.2aI49qXEfR/libproc-dlmlib.so.0.0.0': Invalid cross-device link
make: *** [Makerules:24: /tmp/tmp.2aI49qXEfR/libproc-dlmlib.so] Error 1
make: *** Deleting file '/tmp/tmp.2aI49qXEfR/libproc-dlmlib.so'

With both in /tmp:

$ cd $(mktemp -d) && make -C /tmp/dtrace-utils/ objdir=$(pwd) -j1
[...]
SHLINK: libdtrace.so
SHLINK: libproc-dlmlib.so
ln: failed to create symbolic link 'test/triggers/libproc-dlmlib.so.0': File exists
make: *** [Makerules:25: /tmp/tmp.Hu7sQqZzMN/libproc-dlmlib.so] Error 1
make: *** Deleting file '/tmp/tmp.Hu7sQqZzMN/libproc-dlmlib.so'

Also, it looks like configure does support --objdir but it also has a bunch of hardcoded build/. Not tried it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Makerules and configure, then inspect the hardcoded build/ paths mentioned in the issue. Reproduce the two out-of-source builds with objdir in separate temporary directories, including the cross-device and existing-symlink failures. Done means the reported builds complete successfully without those copy or symlink errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.