Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] cmake build style doesn't allow to choose source dir
@ 2020-04-11 14:32 yopito
  2020-04-11 14:43 ` pullmoll
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: yopito @ 2020-04-11 14:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

New issue by yopito on void-packages repository

https://github.com/void-linux/void-packages/issues/20878

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  Void 5.4.31_1 x86_64-musl GenuineIntel uptodate rrnFF

* package:  packaging shiboken2 update to 5.14.2 (WIP)


### Expected behavior

want to use cmake with sources of a subdir of $wkrsrc via `-S` cmake flag:
```
[...]
wrksrc="${_pkgname}"
build_style=cmake
configure_args=" ... -S sources/shiboken2"
[...]
```
### Actual behavior

`-S <subdir>` has no effect.

### Additional details

xbps-src append "`../`" to cmake arguments unconditionally.  
Resulting command is something like `cmake (args) -S sources/shiboken2 ../`

So cmake uses sources of ${wrksrc}/build/.. instead of ${wrksrc}/sources/shiboken2/

Implied by `common/build-style/cmake.sh` on sed expression L63:

```
    60          # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
    61          CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
    62                  cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \
    63                          -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g')
    64
```
### Workaround

My current workaround: adding subdir to $wrksrc:

```
wrksrc="${_pkgname}/sources/shiboken2"
build_style=cmake
configure_args=" ... "  # removed " -S sources/shiboken2 "
[...]
```
... that makes xlint nervous:
```
srcpkgs/shiboken2/template:7: wrksrc should be a top-level directory
```


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
@ 2020-04-11 14:43 ` pullmoll
  2020-04-11 19:07 ` yopito
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 14:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612436795

Comment:
Can't you use `build_wrksrc="sources/shiboken2"` here?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
  2020-04-11 14:43 ` pullmoll
@ 2020-04-11 19:07 ` yopito
  2020-04-11 19:08 ` xtraeme
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: yopito @ 2020-04-11 19:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612492537

Comment:
nope: need to manage source dir at the configure step, not the build one.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
  2020-04-11 14:43 ` pullmoll
  2020-04-11 19:07 ` yopito
@ 2020-04-11 19:08 ` xtraeme
  2020-04-11 20:56 ` pullmoll
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: xtraeme @ 2020-04-11 19:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by xtraeme on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612492836

Comment:
so let's modify `build-style/cmake.sh` then!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (2 preceding siblings ...)
  2020-04-11 19:08 ` xtraeme
@ 2020-04-11 20:56 ` pullmoll
  2020-04-11 21:23 ` yopito
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 20:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612512019

Comment:
Despite its name `build_wrksrc` is a modifier for all steps, not just build. See `common/xbps-src/shutils/common.sh` and there `ch_wrksrc()` which is called from every `run_step()`.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (3 preceding siblings ...)
  2020-04-11 20:56 ` pullmoll
@ 2020-04-11 21:23 ` yopito
  2020-04-11 21:41 ` pullmoll
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: yopito @ 2020-04-11 21:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612516387

Comment:
I was not aware of that.  
But within its `do_configure()` , cmake.sh (re)changes current dir to $cmake_builddir, so `build_wrksrc` is is not relevant in this case:

```
$ cat -n common/build-style/cmake.sh 
     1  #
     2  # This helper is for templates using cmake.
     3  #
     4  do_configure() {
     5          local cmake_args=
     6          [ ! -d ${cmake_builddir:=build} ] && mkdir -p ${cmake_builddir}
     7          cd ${cmake_builddir}
     8
[...]
```


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (4 preceding siblings ...)
  2020-04-11 21:23 ` yopito
@ 2020-04-11 21:41 ` pullmoll
  2020-04-11 21:41 ` pullmoll
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 21:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612519042

Comment:
Hmm... I think it's just that instead of `:=build` there should be something like `$PWD/build` which would then create the `build` directory below the possible `build_wrksrc`sub-directory inside `$wrksrc`, or just below `$wrksrc`. Anyway, this should be fixed in a way that doesn't complicate things :)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (5 preceding siblings ...)
  2020-04-11 21:41 ` pullmoll
@ 2020-04-11 21:41 ` pullmoll
  2020-04-11 21:42 ` pullmoll
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 21:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612519042

Comment:
Hmm... I think it's just that instead of `:=build` there should be something like `:=$PWD/build` which would then create the `build` directory below the possible `build_wrksrc`sub-directory inside `$wrksrc`, or just below `$wrksrc`. Anyway, this should be fixed in a way that doesn't complicate things :)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (6 preceding siblings ...)
  2020-04-11 21:41 ` pullmoll
@ 2020-04-11 21:42 ` pullmoll
  2020-04-11 21:42 ` pullmoll
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 21:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612519042

Comment:
Hmm... I think it's just that instead of `:=build` there should be something like `:=$PWD/build` which would then create the `build` directory below the possible `$build_wrksrc`sub-directory inside `$wrksrc`, or just below `$wrksrc`. Anyway, this should be fixed in a way that doesn't complicate things :)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (7 preceding siblings ...)
  2020-04-11 21:42 ` pullmoll
@ 2020-04-11 21:42 ` pullmoll
  2020-04-13  8:36 ` [ISSUE] [CLOSED] " yopito
  2020-04-13  8:36 ` yopito
  10 siblings, 0 replies; 12+ messages in thread
From: pullmoll @ 2020-04-11 21:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612519042

Comment:
Hmm... I think it's just that instead of `:=build` there should be something like `:=$PWD/build` which would then create the `build` directory below the possible `$build_wrksrc`sub-directory inside `$wrksrc`, or simply below `$wrksrc`. Anyway, this should be fixed in a way that doesn't complicate things :)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ISSUE] [CLOSED] cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (8 preceding siblings ...)
  2020-04-11 21:42 ` pullmoll
@ 2020-04-13  8:36 ` yopito
  2020-04-13  8:36 ` yopito
  10 siblings, 0 replies; 12+ messages in thread
From: yopito @ 2020-04-13  8:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

Closed issue by yopito on void-packages repository

https://github.com/void-linux/void-packages/issues/20878

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  Void 5.4.31_1 x86_64-musl GenuineIntel uptodate rrnFF

* package:  packaging shiboken2 update to 5.14.2 (WIP)


### Expected behavior

want to use cmake with sources of a subdir of $wkrsrc via `-S` cmake flag:
```
[...]
wrksrc="${_pkgname}"
build_style=cmake
configure_args=" ... -S sources/shiboken2"
[...]
```
### Actual behavior

`-S <subdir>` has no effect.

### Additional details

xbps-src append "`../`" to cmake arguments unconditionally.  
Resulting command is something like `cmake (args) -S sources/shiboken2 ../`

So cmake uses sources of ${wrksrc}/build/.. instead of ${wrksrc}/sources/shiboken2/

Implied by `common/build-style/cmake.sh` on sed expression L63:

```
    60          # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
    61          CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
    62                  cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \
    63                          -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g')
    64
```
### Workaround

My current workaround: adding subdir to $wrksrc:

```
wrksrc="${_pkgname}/sources/shiboken2"
build_style=cmake
configure_args=" ... "  # removed " -S sources/shiboken2 "
[...]
```
... that makes xlint nervous:
```
srcpkgs/shiboken2/template:7: wrksrc should be a top-level directory
```


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cmake build style doesn't allow to choose source dir
  2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
                   ` (9 preceding siblings ...)
  2020-04-13  8:36 ` [ISSUE] [CLOSED] " yopito
@ 2020-04-13  8:36 ` yopito
  10 siblings, 0 replies; 12+ messages in thread
From: yopito @ 2020-04-13  8:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/issues/20878#issuecomment-612808426

Comment:
my bad !  
As suggested by @pullmoll : `build_wrksrc` is working perfectly fine in this case.

FTR, my `template` is now:
```
[...]
wrksrc="${_pkgname}"
build_wrksrc="sources/shiboken2"
build_style=cmake
configure_args="(args not specific to this issue)"
[...]
```

... let's close this non-issue

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-04-13  8:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 14:32 [ISSUE] cmake build style doesn't allow to choose source dir yopito
2020-04-11 14:43 ` pullmoll
2020-04-11 19:07 ` yopito
2020-04-11 19:08 ` xtraeme
2020-04-11 20:56 ` pullmoll
2020-04-11 21:23 ` yopito
2020-04-11 21:41 ` pullmoll
2020-04-11 21:41 ` pullmoll
2020-04-11 21:42 ` pullmoll
2020-04-11 21:42 ` pullmoll
2020-04-13  8:36 ` [ISSUE] [CLOSED] " yopito
2020-04-13  8:36 ` yopito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).