0

For the past 4 days I have been working to get taskwarrior and taskwarrior server running on windows 10. It has proven quite a challenge for me.

I followed the steps written below: "Building the Stable Version" on https://taskwarrior.org/docs/build.html and created a folder:

C:\taskwarrior

Opened Developer Command Prompt for VC 2017

cd /d C:/taskwarrior

git clone https://github.com/GothenburgBitFactory/taskwarrior.git taskwarrior.git

cd taskwarrior.git

git checkout master

And then depending on whether I try to build taskwarrior with Sync enabled (automatically unless manually disabled):

cmake -DCMAKE_BUILD_TYPE=release .

GNUTLS_library is missing

or:

cmake -DCMAKE_BUILD_TYPE=release . -DENABLE_SYNC=OFF

-- libuuid not found.

A short summary of steps followed and attempts so far:

  1. Downloaded and installed Microsoft Visual C++ 2017 Redistributable (x64 and x86) from: https://visualstudio.microsoft.com/vs/features/cplusplus/
  2. Ensured cl was available as suggested in the documentation of microsoft: https://msdn.microsoft.com/en-us/library/cyz1h6zd.aspx
  3. Downloaded MinGW installation Manager and installed the base package as was suggested on http://www.mingw.org/wiki/Getting_Started:

If you do wish to install mingw-get-inst.exe's obligatory set, (including the GNU C Compiler, the GNU Debugger (GDB), and the GNU make tool), you should select the mingw-base package for installation.

  1. Installing Cmake from https://cmake.org/download/
  2. Running the commands described above from cmd in administrator mode
  3. Opening Cmake selecting the source folder:

    C:/taskwarrior/taskwarrior.git

With build folder:

C:/taskwarrior

This gave the exact same errors as when I tried the it through the Developer Command Prompt for VC 2017 described above, from which I conclude that I do not have a typo in my commands described above.

  1. Even though it should be installed with Mingw already, GNU is still not found (even after reboot). So I tried downloading it manually from:
  2. http://gnuwin32.sourceforge.net/packages/make.htm
  3. https://sourceforge.net/projects/gnuwin32/

  4. And I tried the following commands from Command prompt:

    install libgnutlsxx28 gnutls-dev install gnutls-dev

  5. As suggested in the install file in taskwarrior for Debian based distributions, I tried:

    libgnutls-dev

    Which opens the IncrediBuild Version 9.2.1 Setup, I currently do not know what that does.

  6. I tried downloading the libuuid library from: https://sourceforge.net/projects/libuuid/ but I currently do not know how to build and install it.

  7. I tried installing it through python in cmd with:

    easy_install python-libuuid

  8. Learning building programs from source code from: https://msdn.microsoft.com/en-us/library/cyz1h6zd.aspx

  9. Learning and practicing from https://github.com/codebox/bitmeteros/wiki/How-to-build-on-Windows.
  10. At the end I learned I had Cygwin installed already and that I could simply install an old version of taskwarrior by reinstalling cygwin and checking/marking the task package. So I have the taskwarrior running, but not the taskwarrior server. And moreover I am trying to learn how to build code/projects from source, so I am trying to make a succesfull build to increase my skillset and hence toolset.
  11. The explenation to install GNU TLS 3.6.2 on https://www.gnutls.org/manual/gnutls.html#Downloading-and-installing is limited to:

The package is then extracted, configured and built like many other packages that use Autoconf. For detailed information on configuring and building it, refer to the INSTALL file that is part of the distribution archive. Typically you invoke ./configure and then make check install.

However, the latest GNUTLS for Windows x64 download file: Latest w64 version on gitlab on: https://www.gnutls.org/download.html named artifacts.zip contains no file named INSTALL.

So I am currently working on understanding how to configure and built using autoconf.

Question: Do you know how I could install the GNU library and/or libuuid library on windows 10?

4

2 回答 2

1

I'm not sure that it is still relevant to your problem, but I was able to build taskwarrior v2.5.1 under 64-bit cygwin (on Win7), using the cmake line from here: TW-1845 Cygwin build fails, missing get_current_dir_name

Namely, this cmake line followed by make:

cmake -DHAVE_GET_CURRENT_DIR_NAME=0
于 2018-08-25T09:57:56.597 回答
0

I am likely to have misunderstood the context. GnuTLS Appears to be a program that works/is made for a linux/debian operating system.

Nevertheless, the following two solutions were effective in:

  1. Finding and using the UUID library in Windows.
  2. Solving the XY-problem and using GnuTLS on a "windows pc" (with Linux on it).:

For the missing UUID missing library error:

  1. Open explorer>go to C: (or other system disc)>search for: uuid.lib>Memorize the path to the/any uuid.lib file. (For me C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib worked)
  2. Open Cmake and in UUID_LIBRARY_DIR enter:
  3. C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib
  4. Then in UUID_LIBRARY enter: C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib/Uuid.Lib Where you substitute C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Lib with the path you found yourself for your own UUID.lib at step 1.

That made CMake overcome the UUID error in windows.

Now for the GnuTLS I could not find a solution in windows itself. But when I read the taskserver installation guide on: https://gitpitch.com/GothenburgBitFactory/taskserver-setup#/4/4 I learned that Taskwarrior is not intended to run on Windows itself/natively, but in a linux environment (To be specific, the linux distribution Ubuntu is recommended to be installed on windows as is specified here: https://taskwarrior.org/download/) it takes 1 click to completely download and install the linux distribution (which currently looks like an emulator to me).

In the windows store one can download Ubuntu and other Linux distributions as Debian GNU/Linux: https://docs.microsoft.com/en-us/windows/wsl/install-win10. Since I had quite a bit of difficulties installing GnuTLS I tried the debian GNU/Linux distribution, hoping it would be pre-installed in the distribution. The following commands successfully installed taskwarrior and GnuTLS and Taskserver on the debian GNU/Linux:

  1. sudo apt-get update
  2. sudo apt-get install taskwarrior
  3. cd /home/a/
  4. then create new directory 'taskwarrior'
  5. mkdir taskwarrior
  6. cd /home/a/taskwarrior

    Task Server installation in Debian:

  7. sudo apt install g++

  8. sudo apt install libgnutls28-dev
  9. sudo apt install uuid-dev
  10. sudo apt install cmake
  11. **sudo apt install gnutls-utils**

gnutls failed so:

  1. **sudo apt-get update**
  2. **sudo apt install gnutls-utils**
  3. sudo apt-get update
  4. sudo apt-get install git-core

Source: https://gitpitch.com/GothenburgBitFactory/taskserver-setup#/6/1 suggests you enter: git clone --recurse-submodules=yes https://github.com/GothenburgBitFactory/taskserver.git taskserver.git that gave the following error: optionrecurse-submodulestakes no value, so rewrite it to:

  1. git clone https://github.com/GothenburgBitFactory/taskserver.git taskserver.git

  2. cd taskserver.git/

  3. git checkout master

  4. cmake -DCMAKE_BUILD_TYPE=release .

  5. make

Now you can test the build as described in: https://gitpitch.com/GothenburgBitFactory/taskserver-setup#/6/8 Note: the SOURCEDIR now is home/a/taskwarrior/taskserver.git (/test I currently do not know whether /test is a subfolder of the source or the actual source directory)

  1. sudo make install

Note: You can Verify GnuTLS installation with:

  1. task diagnostics | grep libgnutls
  2. sudo apt install taskd

Remaining unanswered The above only answers half of my question (and solves the XY-problem). The installation of GnuTLS on windows itself is still not solved. I currently am unsure about the download

GNU for windows

Latest w64 version on gitlab gnutls_3_6_0_1:mingw64

on https://gnutls.org/download.html.

  1. It contains a lib and a bin folder, which seems to indicate that even the files listed under "windows" are intended for a Linux Operating System(OS) (since I think those type of folders are not used conventionally used in windows/I do not know what to do with them/how to install them).
  2. That would imply that GnuTLS assumes that the only application of GnuTLS, even on a Windows operating system happens in a Linux system. It could also just be my lack of knowledge/work/understanding in how to use/install those files in windows.

So if anyone can still answer how GnuTLS on windows is intended to be applied, I would greatly appreciate the insight!

于 2018-07-04T06:38:30.837 回答