curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: curl Windows build and setenv command

From: Kees Dekker <Kees.Dekker_at_infor.com>
Date: Wed, 4 Apr 2018 09:41:53 +0000

Hi,

I tried to make my first git pull request. This request add an unconditional clean target.
With the current setup, calling clean was not possible as calling nmake -f Makefile.vc of name -f MakefileBuild.vc failed if no mode was specified. See: https://github.com/curl/curl/pull/2455

This is a first try to see whether Windows changes are also picked up by maintainers 😊. Once I used the right process, I will make additional pull requests for other windows build issues as well.

Kees

> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Kees Dekker
> Sent: Wednesday, March 21, 2018 11:01
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: RE: curl Windows build and setenv command
>
> And may be useful additional information:
>
> I'm now calling the build scripts in a form like this:
> set OPENSSL_PATH=<path>\OpenSSL\build\Windows\x64
> set LIBSSH2_PATH=<path>\libssh2\build\Windows
> set ZLIB_PATH=<path>\zlib\build\Windows\include
> set CL=/D "WINVER=0x0601" /D "_WIN32_WINNT=0x0601"
> nmake -f Makefile.vc mode=static VC=14 WITH_SSL=static WITH_ZLIB=static
> WITH_SSH2=static GEN_PDB=yes DEBUG=no MACHINE=x64
> SSL_CFLAGS="/I<osslincdir> " ZLIB_CFLAGS="/I<zlibincdir> "
> SSH2_CFLAGS="/I<libssh2incdir> " SSL_LIBS="libcrypto.lib libssl.lib"
> ZLIB_LIBS=zlib.lib SSH2_LIBS=libssh2.lib
> DEVEL_LFLAGS="/LIBPATH:<osslibdir> /LIBPATH:<zlibdir>
> /LIBPATH:<libssh2libdir> "
>
> BTW: I'm using static libs for cURL, openSSL, zlib and libssh2 but dynamic libs
> for the Windows part. Incorporating Windows libraries into cURL is IMO not
> recommended/potential cause of issues when using the
> cURL/openSSL/zlib/libssh2 static libs. That's also why the link /lib command in
> the makefile is incorrect (as in accumulates all static libs in one libcurl.lib).
>
> Kees
>
> > -----Original Message-----
> > From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> > Kees Dekker
> > Sent: Wednesday, March 21, 2018 10:03
> > To: libcurl development <curl-library_at_cool.haxx.se>
> > Subject: RE: curl Windows build and setenv command
> >
> > Hi Richard,
> >
> > That's at least one of the things I like to address too.
> > I've several issues:
> > 1. allow to specify paths to other libs/includes (from a read-only location) as
> I
> > don’t like to copy things first (because Visual Studio does not always like it,
> as
> > .lib, pdb etc belong together and get stored in the build results)
> > 2. wrong build flags (e.g. combining /Zi and /Z7 is not allowed) causing build
> > errors or to incorporate Windows libraries (as static stuff) into (static)
> > libcurl.lib. This is unwanted.
> >
> > I already have a modified copy of Makefile.vc and MakefileBuild.vc (based
> on
> > cURL 7.57). See attachments (including unmodified curl 7.57 ones = 4 files
> as
> > attachment). However, especially Makefilebuild.vc contains a lot of
> changes,
> > which make it somewhat difficult to understand what I did (compare .org
> > with non-org file to see what I changed).
> >
> > My intention is that both static cURL and dynamic (DLL) cURL builds well,
> > incuding proper PDB generation (based on USE_PDB flag) and lib stubs (the
> > static curl.lib is something different that the DLL lib stub).
> >
> > Questions:
> > Q1: I'm new to git, so I did not yet create a pull request, and I also don't
> know
> > how to get or check your changes.
> > Q2: I'm not sure: but why is there still support for ancient VC6?
> > Q3: And how do the Makefile based solution related to the
> projects/solution
> > based approach?
> > Q4: I'm not sure how easy the project/solution based approach can be
> used
> > to extend cURL with other libs (zlib/libssh2/openSSL). So that is also why I
> put
> > my original question.
> > Q5: Is setenv something incorrect in the winbuild documentation?
> >
> > Regards,
> > Kees
> >
> > > -----Original Message-----
> > > From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf
> Of
> > > Richard Alcock
> > > Sent: Tuesday, March 20, 2018 17:48
> > > To: libcurl development <curl-library_at_cool.haxx.se>
> > > Subject: Re: curl Windows build and setenv command
> > >
> > > Kees,
> > >
> > > I also started looking at changes to winbuild that would mean we don't
> > > need to put all the dependencies under same folder, so I'm interested
> > > in what you are thinking about as well.
> > >
> > > What I played with (using zlib as the example) added ways to allow us
> > > to override the library path, include directory and library names.
> > > Everything is intended to default to what happens today if not set.
> > >
> > > WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
> > > WITH_ZLIB_LIBPATH=<path> - Path to zlib library files. If set is
> > > used instead of WITH_DEVEL path.
> > > WITH_ZLIB_INCLUDE=<path> - Path to zlib header files. If set is used
> > > instead of WITH_DEVEL path.
> > > WITH_ZLIB_LIBS=<name.lib> - Name of zlib library
> > >
> > > You can see what it looks like at
> > > https://github.com/richardthe3rd/curl/tree/windows_zlib_locations
> > >
> > > Richard
> > >
> > >
> > > On 20 March 2018 at 15:57, Kees Dekker <Kees.Dekker_at_infor.com>
> wrote:
> > > > Hi,
> > > >
> > > >
> > > >
> > > > In
> > > https://github.com/curl/curl/blob/master/winbuild/BUILD.WINDOWS.txt
> > > > something is told about setenv, however, recent Windows versions do
> > not
> > > have
> > > > a setenv command and neither has the Visual Studio command prompt
> > > (I’m using
> > > > Visual Studio 2015 on Windows 10 and/or Windows Server 2012 or 2016)
> > > has it.
> > > >
> > > > Q1: Is this a typo? Does Windows really have a setenv command? I’m
> only
> > > > aware of a set command (to set environment variable). Where is
> setenv
> > on
> > > a
> > > > (default) Windows system?
> > > >
> > > >
> > > >
> > > > In addition to previous question:
> > > >
> > > > Q2: What kind of build on Windows is preferred? The on in winbuild or
> > the
> > > > project/solution files under the projects\Windows directory?
> > > >
> > > >
> > > >
> > > > Background: my goal is to figure out whether I can address the issues as
> > > > reported on https://github.com/curl/curl/issues/1201.
> > > >
> > > > Currently, I’m using an own variant from the winbuild stuff (curl 7.57,
> > > > with openSSL 1.1.0g, latest zlib and libssh2 libraries).
> > > >
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Kees
> > > >
> > > >
> > > > -------------------------------------------------------------------
> > > > Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> > > > Etiquette: https://curl.haxx.se/mail/etiquette.html
> > >
> > > -------------------------------------------------------------------
> > > Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> > > Etiquette: https://curl.haxx.se/mail/etiquette.html
>
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-04-04