unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* about  -lcurses
@ 2018-11-09 19:46 guy fleury
  2018-11-09 23:27 ` Mathieu Othacehe
  2018-11-10  1:55 ` Maxim Cournoyer
  0 siblings, 2 replies; 8+ messages in thread
From: guy fleury @ 2018-11-09 19:46 UTC (permalink / raw)
  Cc: help-guix

hi all,

i try to package a editor "nice editor":
i got this error: 
     
    ld: cannot find -lcurses

on debian it works because -lcurses is a symlink to -lncurses(if i am
not wrong) 

is there a solution without make a patch to the makifile?
here is my package definition:
-------------------------------------------------------
(define-module (gnu packages ne)
  #:use-module (guix licenses)
  #:use-module (gnu packages ncurses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu))
(define-public ne
(package
  (name "ne")
  (version "3.1.2")
  (source (origin
            (method url-fetch)
            (uri (string-append "http://ne.di.unimi.it/ne-" version
                                ".tar.gz"))
            (sha256
             (base32
              "06qk3cqxyn098i1yn686bigpgh8vrrnj0qpkrgs6zwnq42s1y0d2")))
)
           
            
  (build-system gnu-build-system)
  (arguments
       `(#:tests? #f
          #:make-flags (list (string-append "prefix=" (assoc-ref
%outputs "out"))
                   "CC=gcc")
         #:parallel-build? #f
         #:phases (modify-phases %standard-phases (delete
'configure))))
  (inputs
     `(("ncurses" ,ncurses)))
  (synopsis "TODO")
  (description "TODO")
  (home-page " http://ne.di.unimi.it/ne")
  (license gpl3+)))


   

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

* Re: about  -lcurses
  2018-11-09 19:46 about -lcurses guy fleury
@ 2018-11-09 23:27 ` Mathieu Othacehe
  2018-11-10  1:55 ` Maxim Cournoyer
  1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Othacehe @ 2018-11-09 23:27 UTC (permalink / raw)
  To: guy fleury; +Cc: help-guix


Hi Guy,

Your package is almost working, the important thing was to specified
"ncurses" as an input like you did.

> on debian it works because -lcurses is a symlink to -lncurses(if i am
> not wrong) 

Yes, I guess they are doing some kind of symlinking. To make it work,
you can replace -lcurses by -lncurses, this way:

--8<---------------cut here---------------start------------->8---
#:phases
      (modify-phases %standard-phases
        (delete 'configure)
        (add-before 'build 'curses
           (lambda _
             (substitute* "src/makefile"
               (("lcurses") "lncurses"))
             #t)))
--8<---------------cut here---------------end--------------->8---

You also have a small mistake here

>           #:make-flags (list (string-append "prefix=" (assoc-ref
                                                 ^
prefix should be upper case.

Then, you should be able to build your package ;)

Mathieu

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

* Re: about  -lcurses
  2018-11-09 19:46 about -lcurses guy fleury
  2018-11-09 23:27 ` Mathieu Othacehe
@ 2018-11-10  1:55 ` Maxim Cournoyer
  2018-11-10  7:35   ` guy fleury
  1 sibling, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2018-11-10  1:55 UTC (permalink / raw)
  To: guy fleury; +Cc: help-guix

Hello,

guy fleury <hoonandon@gmail.com> writes:

> hi all,
>
> i try to package a editor "nice editor":
> i got this error: 
>      
>     ld: cannot find -lcurses
>
> on debian it works because -lcurses is a symlink to -lncurses(if i am
> not wrong) 
>
> is there a solution without make a patch to the makifile?

If -lncurses would be enough, then I believe the simplest solution would
be to add a build phase and use a substitute* call to patch the
Makefile. You'll find plenty of examples of similar things in the
packages sources.

HTH!

Maxim

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

* Re: about  -lcurses
  2018-11-10  1:55 ` Maxim Cournoyer
@ 2018-11-10  7:35   ` guy fleury
  2018-11-10  9:46     ` Pierre Neidhardt
  0 siblings, 1 reply; 8+ messages in thread
From: guy fleury @ 2018-11-10  7:35 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: help-guix

thank you very much,

this is what i did
--------------------------------
            (snippet
               ;; use lncurses instead of lcurses
               '(begin
                  (substitute* "src/makefile"
                    (("-lcurses")
                     "-lncurses"))
                  #t))))
---------------------------------
Now it works.
i got to polish it and try to send a patch.

Guy  

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

* Re: about  -lcurses
  2018-11-10  7:35   ` guy fleury
@ 2018-11-10  9:46     ` Pierre Neidhardt
  2018-11-10 10:12       ` Mathieu Othacehe
  2018-11-10 10:59       ` Hy Od
  0 siblings, 2 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2018-11-10  9:46 UTC (permalink / raw)
  To: guy fleury; +Cc: help-guix

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


> You also have a small mistake here
> 
> :           #:make-flags (list (string-append "prefix=" (assoc-ref
>                                                  ^
> prefix should be upper case.

This might not be correct, depending on which Make and the Makefile.
Lowercase "prefix" is actually the right directory variable for GNU Make.
See the "(make) Directory Variables" info page.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: about -lcurses
  2018-11-10  9:46     ` Pierre Neidhardt
@ 2018-11-10 10:12       ` Mathieu Othacehe
  2018-11-10 10:59       ` Hy Od
  1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Othacehe @ 2018-11-10 10:12 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

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

Hi Pierre,

This might not be correct, depending on which Make and the Makefile.
> Lowercase "prefix" is actually the right directory variable for GNU Make.
> See the "(make) Directory Variables" info page.
>

In that precise case, without an upper case PREFIX, it won't build (check
the root makefile).

Mathieu

[-- Attachment #2: Type: text/html, Size: 602 bytes --]

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

* Re: about -lcurses
  2018-11-10  9:46     ` Pierre Neidhardt
  2018-11-10 10:12       ` Mathieu Othacehe
@ 2018-11-10 10:59       ` Hy Od
  2018-11-10 11:01         ` Hy Od
  1 sibling, 1 reply; 8+ messages in thread
From: Hy Od @ 2018-11-10 10:59 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

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

Hi,
for me PREFIX and prefix seems to be the same!

I have sent a patch of ne package to guix-patch maillist!
Le 10 nov. 2018 11:46, "Pierre Neidhardt" <mail@ambrevar.xyz> a écrit :

>
> > You also have a small mistake here
> >
> > :           #:make-flags (list (string-append "prefix=" (assoc-ref
> >                                                  ^
> > prefix should be upper case.
>
> This might not be correct, depending on which Make and the Makefile.
> Lowercase "prefix" is actually the right directory variable for GNU Make.
> See the "(make) Directory Variables" info page.
>
> --
> Pierre Neidhardt
> https://ambrevar.xyz/
>

[-- Attachment #2: Type: text/html, Size: 1095 bytes --]

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

* Re: about -lcurses
  2018-11-10 10:59       ` Hy Od
@ 2018-11-10 11:01         ` Hy Od
  0 siblings, 0 replies; 8+ messages in thread
From: Hy Od @ 2018-11-10 11:01 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

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

I'm Guy!
Le 10 nov. 2018 12:59, "Hy Od" <hoonandon@gmail.com> a écrit :

> Hi,
> for me PREFIX and prefix seems to be the same!
>
> I have sent a patch of ne package to guix-patch maillist!
> Le 10 nov. 2018 11:46, "Pierre Neidhardt" <mail@ambrevar.xyz> a écrit :
>
>>
>> > You also have a small mistake here
>> >
>> > :           #:make-flags (list (string-append "prefix=" (assoc-ref
>> >                                                  ^
>> > prefix should be upper case.
>>
>> This might not be correct, depending on which Make and the Makefile.
>> Lowercase "prefix" is actually the right directory variable for GNU Make.
>> See the "(make) Directory Variables" info page.
>>
>> --
>> Pierre Neidhardt
>> https://ambrevar.xyz/
>>
>

[-- Attachment #2: Type: text/html, Size: 1434 bytes --]

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

end of thread, other threads:[~2018-11-10 11:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 19:46 about -lcurses guy fleury
2018-11-09 23:27 ` Mathieu Othacehe
2018-11-10  1:55 ` Maxim Cournoyer
2018-11-10  7:35   ` guy fleury
2018-11-10  9:46     ` Pierre Neidhardt
2018-11-10 10:12       ` Mathieu Othacehe
2018-11-10 10:59       ` Hy Od
2018-11-10 11:01         ` Hy Od

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 read-only IMAP folder(s) and NNTP newsgroup(s).