Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-02 Thread Peter Hull
On Thu, 2 Nov 2023 at 10:35, sebb  wrote:
> On macOS, CC and CXX have the same definition, so it's not surprising
> there was no difference in your testing.
Face palm. Sorry

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-02 Thread sebb
On Thu, 2 Nov 2023 at 10:12, Peter Hull  wrote:
>
> On Wed, 1 Nov 2023 at 23:54, Alex Remily  wrote:
> > I believe it is for cross compilation, owing to the comments in the
> > makefile:
> > # for cross-compilation on Ubuntu, install the g++-mingw-w64-x86-64 package
> I think you could also argue that the other way around - ie. those are
> the packages you need if you want to cross-compile C++.
>
> I quickly tried replacing CXX with CC on a Mac running OS 10.15 and,
> admittedly both failed, but in the same way, finding "LibreSSL" in the
> version string rather than "OpenSSL". This is mentioned in
> BUILDING.txt and I assume it could be fixed by following the
> suggestion in that file, but I can't risk messing anything up just at
> the moment. So I don't think in that case using the C linker instead
> of the C++ linker caused any problems.

On macOS, CC and CXX have the same definition, so it's not surprising
there was no difference in your testing.

> This seems like a bit of a "Chesterton's Fence" to me!
>
> Peter
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-02 Thread Peter Hull
On Wed, 1 Nov 2023 at 23:54, Alex Remily  wrote:
> I believe it is for cross compilation, owing to the comments in the
> makefile:
> # for cross-compilation on Ubuntu, install the g++-mingw-w64-x86-64 package
I think you could also argue that the other way around - ie. those are
the packages you need if you want to cross-compile C++.

I quickly tried replacing CXX with CC on a Mac running OS 10.15 and,
admittedly both failed, but in the same way, finding "LibreSSL" in the
version string rather than "OpenSSL". This is mentioned in
BUILDING.txt and I assume it could be fixed by following the
suggestion in that file, but I can't risk messing anything up just at
the moment. So I don't think in that case using the C linker instead
of the C++ linker caused any problems.

This seems like a bit of a "Chesterton's Fence" to me!

Peter

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-01 Thread Alex Remily
I believe it is for cross compilation, owing to the comments in the
makefile:
# for cross-compilation on Ubuntu, install the g++-mingw-w64-x86-64 package

# for cross-compilation on Ubuntu, install the g++-arm-linux-gnueabi package

# for cross-compilation on Ubuntu, install the g++-arm-linux-gnueabihf
package


On Wed, Nov 1, 2023 at 11:17 AM sebb  wrote:

> On Wed, 1 Nov 2023 at 12:53, Gary Gregory  wrote:
> >
> > Maybe there are cross compilation issues... I don't know for sure.
>
> But CXX is only used for the link phase.
>
> > What I
> > do know is that it quite tricky and time consuming to get everything just
> > right when I do a release from multiple machines to get macOS, Linux, and
> > Windows binaries correctly compiled, linked, and packaged up. I hope
> > nothing was broken in all the recent commits.
>
> I think there may need to be some more GH tests to check all the
> combinations.
>
> > Gary
> >
> > On Wed, Nov 1, 2023, 8:45 AM sebb  wrote:
> >
> > > Crypto currently only uses .c files, and the Makefile uses CC
> > > throughout, except for creating the object output. [This has been the
> > > case since the initial release.]
> > >
> > > Using CXX (C++) for the link does not make sense to me - surely CC can
> > > create the object equally well?
> > >
> > > It would simplify builds (and especially docker builds) if C++ could be
> > > dropped.
> > >
> > > But perhaps there is a good reason for using C++ for this step only?
> > >
> > > Sebb
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> > >
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-01 Thread sebb
On Wed, 1 Nov 2023 at 12:53, Gary Gregory  wrote:
>
> Maybe there are cross compilation issues... I don't know for sure.

But CXX is only used for the link phase.

> What I
> do know is that it quite tricky and time consuming to get everything just
> right when I do a release from multiple machines to get macOS, Linux, and
> Windows binaries correctly compiled, linked, and packaged up. I hope
> nothing was broken in all the recent commits.

I think there may need to be some more GH tests to check all the combinations.

> Gary
>
> On Wed, Nov 1, 2023, 8:45 AM sebb  wrote:
>
> > Crypto currently only uses .c files, and the Makefile uses CC
> > throughout, except for creating the object output. [This has been the
> > case since the initial release.]
> >
> > Using CXX (C++) for the link does not make sense to me - surely CC can
> > create the object equally well?
> >
> > It would simplify builds (and especially docker builds) if C++ could be
> > dropped.
> >
> > But perhaps there is a good reason for using C++ for this step only?
> >
> > Sebb
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [CRYPTO] Why does Makefile use CXX (C++) for linking?

2023-11-01 Thread Gary Gregory
Maybe there are cross compilation issues... I don't know for sure. What I
do know is that it quite tricky and time consuming to get everything just
right when I do a release from multiple machines to get macOS, Linux, and
Windows binaries correctly compiled, linked, and packaged up. I hope
nothing was broken in all the recent commits.

Gary

On Wed, Nov 1, 2023, 8:45 AM sebb  wrote:

> Crypto currently only uses .c files, and the Makefile uses CC
> throughout, except for creating the object output. [This has been the
> case since the initial release.]
>
> Using CXX (C++) for the link does not make sense to me - surely CC can
> create the object equally well?
>
> It would simplify builds (and especially docker builds) if C++ could be
> dropped.
>
> But perhaps there is a good reason for using C++ for this step only?
>
> Sebb
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>