Opened 23 months ago
Last modified 21 months ago
#29082 closed defect
Move .pc file from src/ to build/, clean generated *.pc files at 'make distclean', fix 'permission denied' errors — at Version 28
Reported by:  dimpase  Owned by:  

Priority:  blocker  Milestone:  sage9.1 
Component:  build: configure  Keywords:  
Cc:  embray, mkoeppe, jhpalmieri, vbraun, fbissey  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/mkoeppe/move__pc_file_from_src__to_build___clean_generated___pc_files_at__make_distclean_ (Commits, GitHub, GitLab)  Commit:  d6b5677f0a51dd790377482f4608fd041fb0fbbe 
Dependencies:  Stopgaps: 
Description (last modified by )
#29003 introduced 2stage installation of generated *.pc files,
via src/lib/pkgconfig
 but did not provide a way to clean them up at all. And this is a problem (cf. e.g. #29071).
Also, in some installations, repeated installations this code leads to 'permission denied' errors when trying to override readonly files:
[openblas0.3.6.p0] Wrote /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/var/tmp/sage/build/openblas0.3.6.p0/inst/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/lib/pkgconfig/blas.pc [openblas0.3.6.p0] Wrote /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/var/tmp/sage/build/openblas0.3.6.p0/inst/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/lib/pkgconfig/cblas.pc [openblas0.3.6.p0] Wrote /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/var/tmp/sage/build/openblas0.3.6.p0/inst/Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/lib/pkgconfig/lapack.pc [openblas0.3.6.p0] [openblas0.3.6.p0] real 8m40.259s [openblas0.3.6.p0] user 45m2.739s [openblas0.3.6.p0] sys 5m48.754s [openblas0.3.6.p0] Copying package files from temporary location /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/var/tmp/sage/build/openblas0.3.6.p0/inst to /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local [openblas0.3.6.p0] cp: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/./lib/pkgconfig/cblas.pc: Permission denied [openblas0.3.6.p0] cp: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/./lib/pkgconfig/blas.pc: Permission denied [openblas0.3.6.p0] cp: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/.tox/localhomebrewminimal/local/./lib/pkgconfig/lapack.pc: Permission denied
This ticket revises the 2stage installation as follows:
 Because the generated files are for sagethedistribution, not sagelib, they belong into
build
, notsrc
.  Because
configure
(config.status
) creates them,make distclean
cleans them.  Code in
build/make/Makefile.in
is removed in favor of creating a new type=script packagesage_system_blas_facade
, whosespkginstall
does the installation toSAGE_LOCAL
. openblas/spkgconfigure.m4
setsSAGE_BLAS=sage_system_blas_facade
if PC files are generated.
Change History (28)
comment:1 Changed 23 months ago by
 Cc mkoeppe added
 Status changed from new to needs_info
comment:2 followup: ↓ 7 Changed 23 months ago by
comment:3 Changed 23 months ago by
 Dependencies set to #29071
 Description modified (diff)
 Summary changed from clean generated *.pc files to Move .pc file from src/ to build/, clean generated *.pc files at 'make distclean'
Added #29071 as a dependency as it touches the same files.
comment:4 Changed 23 months ago by
 Status changed from needs_info to needs_work
comment:5 followup: ↓ 6 Changed 23 months ago by
(deleted a comment that was intended for #29071.)
comment:6 in reply to: ↑ 5 Changed 23 months ago by
(deleted a comment that was intended for #29071.)
comment:7 in reply to: ↑ 2 Changed 23 months ago by
 Description modified (diff)
Replying to mkoeppe:
My suggestion would be to rewrite this as a script package instead of putting things into
src/
. This stuff really does not belong intosrc/
.
Perhaps we should just create var/
next to src/
and put these things there?
comment:8 Changed 23 months ago by
No, I don't think so. These are configuregenerated files of sagethedistribution  like build/make/Makefile
. There's no need for a new top level.
Let me take care of this ticket after #29071 is done.
comment:9 Changed 23 months ago by
 Dependencies changed from #29071 to #29051, #29071, #29084
comment:10 Changed 23 months ago by
comment:11 Changed 23 months ago by
 Branch set to u/mkoeppe/move__pc_file_from_src__to_build___clean_generated___pc_files_at__make_distclean_
comment:12 Changed 23 months ago by
 Commit set to 2a01db11ef106d00217d3176a794850524467bcd
 Description modified (diff)
Last 10 new commits:
683a926  make installing *.pc files conditional

a0acbcb  correct quoting of m4 index variable

5ee6844  ensure gfortran is available

56541ae  wrap AC_FC_FUNC so that it does not throw an error without Fortran

9d1770a  revert #29025, remove useless [ALL] section

dba7aef  revert from "libraries=" back to sectionspecific "BLAH_libs="

3a4524e  Merge remotetracking branch 'trac/public/packages/numpy/no_DEFAULT_and_ALL_numpy_site_cfg' into openblaspcfix

06f46eb  Add blas to fflas_ffpack linked libraries so that openblas is picked up on Arch

5f16988  Merge branch 'u/arojas/make_fflas_ffpack_detect_and_use_system_openblas_on_arch' of git://trac.sagemath.org/sage into t/29082/move__pc_file_from_src__to_build___clean_generated___pc_files_at__make_distclean_

2a01db1  Move all BLAS PC file installation logic to new script package sage_sage_system_blas_facade

comment:13 Changed 23 months ago by
comment:14 Changed 23 months ago by
comment:15 Changed 22 months ago by
 Dependencies changed from #29051, #29071, #29084 to #29051, #29071, #29084, #26130, #29056
comment:16 Changed 22 months ago by
 Priority changed from blocker to major
I will redo this on top of the hot fix  #29121.
comment:17 Changed 22 months ago by
 Description modified (diff)
comment:18 Changed 22 months ago by
 Commit changed from 2a01db11ef106d00217d3176a794850524467bcd to 2535c186176468a691627bdc0cff84d8387782a8
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2535c18  Move all BLAS PC file installation logic to new script package sage_sage_system_blas_facade

comment:19 Changed 22 months ago by
 Dependencies #29051, #29071, #29084, #26130, #29056 deleted
 Status changed from needs_work to needs_review
Rebased on 9.1.beta4
comment:20 Changed 22 months ago by
 Cc jhpalmieri added
comment:21 Changed 22 months ago by
 Commit changed from 2535c186176468a691627bdc0cff84d8387782a8 to 3f2060ebf71d3cd593efe44a751b1a8017af969b
Branch pushed to git repo; I updated commit sha1. New commits:
3f2060e  Merge tag '9.1.beta5' into t/29082/move__pc_file_from_src__to_build___clean_generated___pc_files_at__make_distclean_

comment:23 Changed 21 months ago by
 Commit changed from 3f2060ebf71d3cd593efe44a751b1a8017af969b to d6b5677f0a51dd790377482f4608fd041fb0fbbe
Branch pushed to git repo; I updated commit sha1. New commits:
d6b5677  Merge tag '9.1.beta6' into t/29082/move__pc_file_from_src__to_build___clean_generated___pc_files_at__make_distclean_

comment:24 Changed 21 months ago by
Agreed on the first two points in the description.
Don't agree on sage_system_blas_facade and the changes to Makefile.in. I don't see how it's "specialpurpose code". It's a quite generic solution that you seem to be replacing with "specialpurpose code" that's very specific to openblas. This ticket was needed for more than just blas.
comment:25 Changed 21 months ago by
 Status changed from needs_review to needs_info
comment:26 Changed 21 months ago by
 Description modified (diff)
comment:27 Changed 21 months ago by
Is my ticket handling the gsl.pc
correctly? Which packages use this file?
comment:28 Changed 21 months ago by
 Description modified (diff)
 Summary changed from Move .pc file from src/ to build/, clean generated *.pc files at 'make distclean' to Move .pc file from src/ to build/, clean generated *.pc files at 'make distclean', fix 'permission denied' errors
My suggestion would be to rewrite this as a script package instead of putting things into
src/
. This stuff really does not belong intosrc/
.