Subject: [bug#72925] [PATCH v10] gnu: Add jpm.

From: Suhail Singh <[email-masked]>
Date: Mon, 07 Oct 2024 20:11:30 -0400

Omar Bassam <[email-masked]> writes:

>>>>>>>> What we need is _some_ mechanism to ensure that when jpm invokes gcc (or
>>>>>>>> g++), the compiler is able to locate the appropriate header files.
>>>>>>>>
>>>>>>>> This should be doable without propagating any other inputs.  For example
>>>>>>>> by ensuring that jpm sets appropriate environment variables (such as
>>>>>>>> $CPATH , $C_INCLUDE_PATH , $CPLUS_INCLUDE_PATH etc.) or flags when
>>>>>>>> invoking the compiler.  If so, that would be the preferred approach.  We
>>>>>>>> only want to propagate those inputs that are strictly necessary.
>>>>>>>>
>>>>>>>> ...
>>>>>>>>
>>>>>>>> I look forward to seeing what you come up with in v11 :)
>>
>> I.e., it's not clear to me that propagating gcc and g++ is necessary.
>> And if the same can be achieved by passing appropriate environment
>> variables, why not?  Could you please answer?
>>
>> Regardless, we are in agreement that the propagation of gcc-toolchain is
>> not necessary and should be removed.
>>
>
> I've now removed gcc from the propagated-inputs I've tested passing the
> gcc to jpm using the --cc flag as follows "jpm build --cc=/path/to/gcc".

Am I understanding correctly that, with v11 in order for the user to be
able to install a Janet package such as "sh", they have to find the
location of gcc being used by jpm and pass that to it?

If so, why?  This is not what I tried to explain above.  The jpm package
"knows" the specific version of gcc (and g++) that have been patched in,
so why does it require the user to take additional action?  I.e., the
goal, IMHO, should be that in a pure container that contains nss-certs,
one is simply able to run "jpm install -l sh" and it works.

> I hope I understood your concern correctly this time.

I don't believe so.

> If not, please feel free to add to the patch whatever you think is
> needed as I'm not a C compiling expert.

Sorry, but I am no C compiling expert either.

In addition, for the past few exchanges, it's not clear that I am able
to bring value to the discussion.  As evidenced by the recent exchanges,
I seem to be struggling with expressing myself effectively.  As such, I
will step-away from actively reviewing this issue.

I hope you are able to get jpm upstreamed with help from jgart and
others more experienced than myself.

-- 
Suhail