unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Omar Bassam <omar.bassam88@gmail.com>
To: Suhail Singh <suhailsingh247@gmail.com>
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>,
	72925@debbugs.gnu.org, Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>,
	Guillaume Le Vaillant <glv@posteo.net>, jgart <jgart@dismail.de>
Subject: [bug#72925] [PATCH v3] adding jpm package
Date: Wed, 2 Oct 2024 23:27:00 +0300	[thread overview]
Message-ID: <CAGSr2rbRNf2keckWZztc4VkUFQt2WBb+e2oYLdZsffaUOcchZw@mail.gmail.com> (raw)
In-Reply-To: <875xqanty2.fsf@gmail.com>

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

On Wed, 2 Oct 2024 at 23:14, Suhail Singh <suhailsingh247@gmail.com> wrote:

> Omar Bassam <omar.bassam88@gmail.com> writes:
>
> >> > This is expected as the jpm install command is meant to install janet
> >> > packages globally which would be impure.
> >>
> >> It would help for this to be noted in some manner.  Be it in the
> >> description or as comments in the package description.
> >
> > I don't think this needs to be said because all package managers
> installed
> > via guix have this issue.
>
> For me, someone familiar with Guix, but unfamiliar with Janet and JPM
> defaults, it wasn't obvious that I needed to add "-l" to the invocation.
>
> I don't believe such a message is necessary, but it would be helpful to
> some (those individuals who aren't familiar with both JPM and Guix).
>

This is where jgart suggestion would be really helpful. I am personally
working on a project
https://lisp-spectrum.org/ where I try to document all the struggles that I
had with the Lisp ecosystem
and try to make it more accessible to new users. (Any contributions are
welcomed of course).


>
> > Also, there is no one way to solve this because jpm gives you the freedom
> > to install packages on a user level
> > or on a project only level.
>
> The fact that JPM doesn't install packages at a user level by default
> was not something I knew previously.
>
> >> > To install janet packages to your local project directory, you need to
> >> add
> >> > the "-l" flag as follows:
> >> > jpm install -l sh
> >>
> >> Does this work for you (for jpm installed via guix)?  If so, could you
> >> please confirm the set of dependencies you have installed in the guix
> >> profile for the above to work?  If not, could you provide an example
> >> invocation that I could test out which would allow me to install a janet
> >> dependency in a local directory?
> >
> > Do you still get the same error?
>
> No, a different one.
>
> > Yes, this does work for me without any other dependencies. I am using
> guix
> > on ubuntu with guix shell.
>
> I am running guix-shell (--pure) with the following dependencies
> installed:
> - janet
> - gcc-toolchain gcc-toolchain:static
> - openssl
> - git
> - jpm
> - bash coreutils
> - curl nss-certs
>
> With the above, when running "jpm --local install sh" I observe the
> following error:
>
> #+begin_example
>   error: ( "cc"
>     "-std=c99"
>
> "-I/gnu/store/rdlvs1p09brkk961lj3vncifb4xlsmm5-janet-1.36.0/include/janet"
>     "-I/tmp/review-72925/jpm_tree/lib"
>     "-O2"
>     "-o"
>     "build/_jmod_posix_spawn.so"
>     "build/posix-spawn.o"
>     "-shared"
>     "-pthread"): No such file or directory
>   error: build fail
>     in pdag
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/dagbuild.janet]
> (tail call) on line 79, column 23
>     in with-dyns
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 236, column 9
>     in defer
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 221, column 5
>     in bundle-install
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 219, column 3
>     in with-dyns
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 234, column 13
>     in defer
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 221, column 5
>     in bundle-install
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/pm.janet]
> on line 219, column 3
>     in install
> [/gnu/store/ffmis4y6rld42biqx5lq4nvsjp0bqiq6-jpm-1.1.0/lib/janet/jpm/commands.janet]
> (tail call) on line 190, column 20
>     in run-main [boot.janet] on line 4432, column 16
>     in cli-main [boot.janet] on line 4613, column 17
> #+end_example
>
> When running "jpm --cc=gcc --local install sh" I get the same error.
>
> I was finally able to get it to succeed by having cc symlink to gcc and
> adding the directory containing the symlink to PATH.  So I believe that
> the package definition you've submitted is correct.  However, I'm
> wondering what (if anything) needs to be done about the issue I
> encountered.
>
> Specifically, it's unclear why passing "-cc=gcc" didn't work (nor did
> setting "CC=gcc", but perhaps JPM ignores the latter?).  Is this an
> upstream bug?  Were my expectations misplaced?  Should the JPM package
> in Guix provide "cc" as well?
>

No, this is not really a Janet or JPM issue but rather the fact that you
are overriding the gcc compiler with a symlinked binary
instead of the absolute path. I faced this issue as well with
LD_LIBRARY_PATH where you have to use "readlink" to point it
to the absolute path of the "lib" folder in your guix profile.


> --
> Suhail
>

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

  reply	other threads:[~2024-10-03  4:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01  8:31 [bug#72925] Adding JPM package for Janet Omar Bassam
2024-09-04  8:22 ` [bug#72925] [PATCH] adding jpm package Omar Bassam
2024-09-05 14:50 ` Omar Bassam
2024-09-18 13:18   ` [bug#72925] Adding JPM package for Janet Suhail Singh
2024-09-18 15:34     ` Omar Bassam
2024-09-18 16:16       ` Suhail Singh
2024-09-30  8:12 ` [bug#72925] [PATCH v3] adding jpm package Omar Bassam
2024-10-01  0:06   ` Suhail Singh
2024-10-02 15:09     ` Omar Bassam
2024-10-02 18:21       ` Suhail Singh
2024-10-02 19:04         ` jgart via Guix-patches via
2024-10-02 19:12         ` Omar Bassam
2024-10-02 20:14           ` Suhail Singh
2024-10-02 20:27             ` Omar Bassam [this message]
2024-10-02 20:33               ` jgart via Guix-patches via
2024-10-02 21:39               ` Suhail Singh
2024-10-02 21:52                 ` Omar Bassam
2024-10-02 22:07                   ` Suhail Singh
2024-10-03  1:40                     ` Suhail Singh
2024-10-03  7:14                       ` Omar Bassam
2024-10-03 13:40                         ` [bug#72925] Adding JPM package for Janet Suhail Singh
2024-10-03 19:45                           ` Omar Bassam
2024-10-03 22:04                             ` Omar Bassam
2024-10-04 16:00                               ` Omar Bassam
2024-10-02 20:27             ` [bug#72925] [PATCH v3] adding jpm package jgart via Guix-patches via
2024-10-02 14:36 ` [bug#72925] [PATCH v5] gnu: add " Omar Bassam
2024-10-02 14:50 ` [bug#72925] [PATCH v6] " Omar Bassam
2024-10-02 14:51 ` [bug#72925] [PATCH v7] " Omar Bassam
2024-10-04 15:17   ` Omar Bassam
2024-10-04 15:57 ` [bug#72925] [PATCH v8] " Omar Bassam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGSr2rbRNf2keckWZztc4VkUFQt2WBb+e2oYLdZsffaUOcchZw@mail.gmail.com \
    --to=omar.bassam88@gmail.com \
    --cc=72925@debbugs.gnu.org \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=glv@posteo.net \
    --cc=jgart@dismail.de \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@gmail.com \
    --cc=suhailsingh247@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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