build: issues with out-of-source (objdir=...)
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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