Github messages for voidlinux
 help / color / mirror / Atom feed
* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
@ 2020-03-16 15:23 ` Eluminae
  2020-03-16 16:55 ` Eluminae
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: Eluminae @ 2020-03-16 15:23 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599597118

Comment:
log: https://dav.misterbanal.net/pub/d7432b44-3927-4ab0-95a5-8ee172d011c4.gkXkXH6Nto.txt

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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
                   ` (5 preceding siblings ...)
  2020-03-16 19:10 ` ametisf
@ 2020-03-16 19:53 ` Eluminae
  6 siblings, 0 replies; 7+ messages in thread
From: Eluminae @ 2020-03-16 19:53 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599730646

Comment:
> I don't see the whole error in your last comment so I can't tell exactly but, Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work.

Yeah I just tried to play with the lts stack variable without
understanding what I was doing, stucked on the "omg it miss all of those
dependencies" step.

> The error you get with cabal is caused by it being built as a dynamically linked binary, all the haskell libraries are being linked dynamicaly, and then you don't include them in the package, xbps goest to search for them and then it tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful to anything else) is to link the binary statically.
> 
> This made it build properly
> ```
> diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template
> index 83dbcd0aac..95681b649c 100644
> --- a/srcpkgs/matterhorn/template
> +++ b/srcpkgs/matterhorn/template
> @@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn"
>  do_build() {
>         rm -f cabal.project
>         cabal new-update
> -       cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
> +       cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic
>  }
> 
>  do_install() {
> ```

Oh yeah, it feels always better when you understand what your doing.
Thanks a lot for you help, you made it working!

> but there are more things that should be fixed about your template, definitely installing with `vbin "$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`.

I agree, I'll try something better. It seems there is a destdir cabal
argument but I think using the bin path a more minimalist way (but the
full path is horrible x))

Thanks again for your help!


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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
                   ` (4 preceding siblings ...)
  2020-03-16 19:10 ` ametisf
@ 2020-03-16 19:10 ` ametisf
  2020-03-16 19:53 ` Eluminae
  6 siblings, 0 replies; 7+ messages in thread
From: ametisf @ 2020-03-16 19:10 UTC (permalink / raw)
  To: ml

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

New comment by ametisf on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599706556

Comment:
I don't see the whole error in your last comment so I can't tell exactly but Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work.

The error you get with cabal is caused by building it as a dynamically linked binary, all the haskell libraries are linked dynamicaly, and then you don't include them in the package, xbps goes to search for them and tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful for anything else) to link the binary statically.

This made it build properly
```
diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template
index 83dbcd0aac..95681b649c 100644
--- a/srcpkgs/matterhorn/template
+++ b/srcpkgs/matterhorn/template
@@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn"
 do_build() {
        rm -f cabal.project
        cabal new-update
-       cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
+       cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic
 }

 do_install() {
```
but there are more things that should be fixed about your template, definitely installing with `vbin "$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`.

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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
                   ` (3 preceding siblings ...)
  2020-03-16 19:10 ` ametisf
@ 2020-03-16 19:10 ` ametisf
  2020-03-16 19:10 ` ametisf
  2020-03-16 19:53 ` Eluminae
  6 siblings, 0 replies; 7+ messages in thread
From: ametisf @ 2020-03-16 19:10 UTC (permalink / raw)
  To: ml

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

New comment by ametisf on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599706556

Comment:
I don't see the whole error in your last comment so I can't tell exactly but Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work.

The error you get with cabal is caused by building it as a dynamically linked binary, all the haskell libraries are linked dynamicaly, and then you don't include them in the package, xbps goes to search for them and tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful for anything else) to link the binary statically.

This made it build properly
```
diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template
index 83dbcd0aac..95681b649c 100644
--- a/srcpkgs/matterhorn/template
+++ b/srcpkgs/matterhorn/template
@@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn"
 do_build() {
        rm -f cabal.project
        cabal new-update
-       cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
+       cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic
 }

 do_install() {
```
but there are more things that should be fixed about your template, definitely installing with `vbin~"$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`.

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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
                   ` (2 preceding siblings ...)
  2020-03-16 18:56 ` ametisf
@ 2020-03-16 19:10 ` ametisf
  2020-03-16 19:10 ` ametisf
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: ametisf @ 2020-03-16 19:10 UTC (permalink / raw)
  To: ml

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

New comment by ametisf on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599706556

Comment:
I don't see the whole error in your last comment so I can't tell exactly but Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work.

The error you get with cabal is caused by building it as a dynamically linked binary, all the haskell libraries are linked dynamicaly, and then you don't include them in the package, xbps goes to search for them and tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful for anything else) to link the binary statically.

This made it build properly
```
diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template
index 83dbcd0aac..95681b649c 100644
--- a/srcpkgs/matterhorn/template
+++ b/srcpkgs/matterhorn/template
@@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn"
 do_build() {
        rm -f cabal.project
        cabal new-update
-       cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
+       cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic
 }

 do_install() {
```
but there are more things that should be fixed about your template, definitely installing with `vbin "$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`.

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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
  2020-03-16 15:23 ` WIP: New package: matterhorn-50200.7.0 Eluminae
  2020-03-16 16:55 ` Eluminae
@ 2020-03-16 18:56 ` ametisf
  2020-03-16 19:10 ` ametisf
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: ametisf @ 2020-03-16 18:56 UTC (permalink / raw)
  To: ml

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

New comment by ametisf on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599706556

Comment:
I don't see the whole error in your last comment so I can't tell exactly but, Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work.

The error you get with cabal is caused by it being built as a dynamically linked binary, all the haskell libraries are being linked dynamicaly, and then you don't include them in the package, xbps goest to search for them and then it tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful to anything else) is to link the binary statically.

This made it build properly
```
diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template
index 83dbcd0aac..95681b649c 100644
--- a/srcpkgs/matterhorn/template
+++ b/srcpkgs/matterhorn/template
@@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn"
 do_build() {
        rm -f cabal.project
        cabal new-update
-       cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
+       cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic
 }

 do_install() {
```
but there are more things that should be fixed about your template, definitely installing with `vbin "$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`.

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

* Re: WIP: New package: matterhorn-50200.7.0
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
  2020-03-16 15:23 ` WIP: New package: matterhorn-50200.7.0 Eluminae
@ 2020-03-16 16:55 ` Eluminae
  2020-03-16 18:56 ` ametisf
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: Eluminae @ 2020-03-16 16:55 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on void-packages repository

https://github.com/void-linux/void-packages/pull/20136#issuecomment-599648411

Comment:
@ametisf 

This is not stack packaged

I got: 

```
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
=> ERROR: matterhorn-50200.7.0_1: do_install: 'STACK_ROOT=$wrksrc/.stack stack ${_stack_args} install ${make_build_args} --local-bin-path=${DESTDIR}/usr/bin' exited with 1
=> ERROR:   in do_install() at common/build-style/haskell-stack.sh:35
```

Is stack cabal compatible ?

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

end of thread, other threads:[~2020-03-16 19:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20136@inbox.vuxu.org>
2020-03-16 15:23 ` WIP: New package: matterhorn-50200.7.0 Eluminae
2020-03-16 16:55 ` Eluminae
2020-03-16 18:56 ` ametisf
2020-03-16 19:10 ` ametisf
2020-03-16 19:10 ` ametisf
2020-03-16 19:10 ` ametisf
2020-03-16 19:53 ` Eluminae

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).