lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] How to compile Lynx 2.9.0dev5


From: Junaid Naseer
Subject: [Lynx-dev] How to compile Lynx 2.9.0dev5
Date: Sat, 25 Apr 2020 14:17:05 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hello everyone,

I have been trying unsuccessfully for the last few days to build the
lynx text web-browser on Windows 10.


        Background (you can skip):

Reason for attempting to do so has been, that I downloaded various
windows binary installers from https://invisible-island.net/lynx/, but I
could get none of them to work with HTTPS. All the SSL-supporting
installers required the C++ 2012 (and/or C++2013) redistributables. (I
tried with both VS C++ redistributables).

Unfortunately, even though "msvcr120.dll" is installed on my system, the
Lynx installer still throws an error /"could not copy msvcr120.dll"/. so
I figured, I might try to compile myself the Lynx project.


        Attempts:

 1.


              Using the make-msc.bat

  * Since I had visual studio 2017 already installed and since I did NOT
    want to install yet another Visual Studio on my system, I tried to
    compile the Lynx browser with the VS 2017.
      o I found out from here
        
<https://stackoverflow.com/questions/49184227/cannot-open-source-file-sys-types-h-sys-stat-h>,
        here
        
<https://stackoverflow.com/questions/38290169/cannot-find-corecrt-h-universalcrt-includepath-is-wrong>,
        here
        
<https://stackoverflow.com/questions/4051088/get-dos-path-instead-of-windows-path>
        and here
        <https://stackoverflow.com/questions/9509166/what-is-winapifamily-h>
        that the location of some files had changed as we moved from
        VS2012 to VS2017. Google and SO helped and after installing
        *Windows Universal CRT SDK* and modifying my *makefile.msc* I
        had added the following list of lines to my makefile.msc:

            SYS_DIR = "C:\PROGRA~2\WI3CF2~1\10\Include\100177~1.0\ucrt"
            SDK_DIR =
            
"C:\PROGRA~2\MICROS~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\include"
            WIN_PATHS = "C:\PROGRA~2\WI3CF2~1\10\Include\100177~1.0\um"
            WIN_PATH2 = "C:\PROGRA~2\WI3CF2~1\10\Include\100177~1.0\shared"
            GNUWIN32 = "C:\no_space\GnuWin32\include"
            CURSES_DIR = "C:\no_space\lynx-cur\PDCURS~1.9"

        And I had added those variables to the *INCLUDES*.

  * So far so good. I had to also install bzip2
    <http://gnuwin32.sourceforge.net/packages/bzip2.htm>, zlib
    <http://gnuwin32.sourceforge.net/packages/zlib.htm>.
  * I wrote from here
    
<https://stackoverflow.com/questions/341817/is-there-a-replacement-for-unistd-h-for-windows-visual-c>my
    unistd.h and from here <https://gist.github.com/ashelly/7776712>my
    getopt.c and getopt.h. (Unfortunately the versions of unistd.h in
    mys2 and mingw64 gave errors, that is why I copied the version from SO).
  * I also download PDCurses and included the path to it in the
    makefile.msc also.

                            CURSES_DIR = "C:\no_space\lynx-cur\PDCURS~1.9"

So far so good. Unfortunately the rabbit hole did not end here.


  * I get a bunch of redefinition errors. Unfortunately, I cannot remove
    either of those paths as one is needed for "sys/type.h" and the
    other one for "winapifamily.h".

C:\PROGRA~2\WI3CF2~1\10\Include\100177~1.0\shared\ws2def.h(103): warning
C4005: 'AF_IPX': macro redefinition
C:\PROGRA~2\WI3CF2~1\10\Include\100177~1.0\um\winsock.h(457): note: see
previous definition of 'AF_IPX'

.......... (similar redefinition errors for more variables)



  * And also I get errors popping from within Lynx as well:

        src\GridText.c(9544): error C2065: 'URL_GET_METHOD': undeclared
        identifier
        src\GridText.c(9560): error C2065: 'URL_MAIL_METHOD': undeclared
        identifier
        src\GridText.c(9569): error C2065: 'URL_MAIL_METHOD': undeclared
        identifier
        src\GridText.c(9571): error C2065: 'URL_POST_METHOD': undeclared
        identifier
        src\GridText.c(9578): error C2065: 'URL_MAIL_METHOD': undeclared
        identifier
        src\GridText.c(9580): error C2065: 'URL_POST_METHOD': undeclared
        identifier
        src\GridText.c(10542): error C2065: 'URL_POST_METHOD':
        undeclared identifier
        src\GridText.c(10975): error C2065: 'URL_MAIL_METHOD':
        undeclared identifier
        src\GridText.c(11049): error C2065: 'URL_MAIL_METHOD':
        undeclared identifier
        src\GridText.c(11222): error C2065: 'URL_GET_METHOD': undeclared
        identifier
        src\GridText.c(11905): error C2065: 'URL_MAIL_METHOD':
        undeclared identifier
        src\GridText.c(11934): error C2065: 'URL_POST_METHOD':
        undeclared identifier


At which point I am thinking, are the devs of Lynx really using VS2012
to build Lynx in 2020?



      2. *Using configure on msys2*

  * Alternatively, I also tried using msys2 and configure a makefile.
    The configure command look like this:

        ./configure --with-curses-dir=/c/no_space/lynx-cur/PDCurses-3.9/
        --with-screen=pdcurses

    But here it fails with this error:

        configure: error: Unable to successfully link Athena library
        (-lXaw) with test program

    I guessed that probably I need to specify for the configure file the
    target system. Looking at the switches --build, --host, --target and
    passing "uwin" or "win" or "windows" as a parameter did not help
    either. The configure file did NOT understand uwin, or win and I
    couldn't extract from the configure file any information about what
    I should pass here. OR how I could specify the configure script to
    generate a makefile for nmake.

  * So I tried a different route with the configure command:

        ./configure --with-curses-dir=/C/Program\
        
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/opt/include/ncursesw 
        --with-screen=ncursesw

    But this always fails to find the respective header files,  be it
    --with-screen=ncursesw or --with-screen=ncurses or with no
    --with-screens switch at all.

        configure: error: No curses header-files found

    Even though they are installed under that path.

        $ ls /C/Program\
        
Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/opt/include/ncursesw

        curses.h     cursesm.h  cursslk.h  form.h      nc_tparm.h    
        ncurses_mingw.h  term_entry.h  unctrl.h
        cursesapp.h  cursesp.h  eti.h      menu.h      ncurses.h     
        panel.h          termcap.h
        cursesf.h    cursesw.h  etip.h     nc_mingw.h  ncurses_dll.h 
        term.h           tic.h

  * I tried alternatively using the curses directory under msys2 or even
    adding the path to those header files in the PATH environment
    variable, but no improvement.



        3. Using the Visual Studio solution files provided in the BUILD
        folder

  * Finally for good measure, I tried to use the solution files for the
    VS2012X64 and VS2012X32 with my Visual studio 2017.
  * I had to include the paths to the PDCurses folder and to the
    GNUWin32/include directory.
  * This seemed like it would work, until Visual Studio threw up an
    error and said that it cannot find pdcurses.lib.
  * Unfortunately, the PDCurses folder has no lib file. The makefiles in
    the pdcurses/wincon directory only generate dll files or .a files.
    No.lib files!


The website invisible island clearly states that the developer has
successfully built Lynx browser under windows using different VS
versions. I am not sure, why I am failing at all methods.


Thank you for your time in reading this. I tried to keep concise despite
the long number of attempts that needed to be described, but still it
turned out long. Any help or nudge in the right direction would be
appreciated.


-- 
mit freundlichen Grüßen / Best Regards,
Junaid Naseer

**************************************************************
Junaid's PGP Public Key:
http://pgp.mit.edu/pks/lookup?op=get&search=0x3EBCBE0BCA218668

How to sign/encrypt EMails/Messages using GNUPGP:
http://www.katescomment.com/how-to-encrypt-email-pgp-thunderbird/

How to Verify PGP Signed Messages/Emails:
http://www.math.utah.edu/~beebe/PGP-notes.html#digital-signatures
**************************************************************

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]