• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4252 shaares
Filters

BoffinBlogger: CVS 1.11.23 Fix

QRCode

CVS 1.11.23 Fix
No one uses cvs any more... except me it seems. It does what I want with little or no fuss and I just don't see the point of fixing something that isn't broke...

Except that it doesn't compile for me any more. I often want to compile it because if I install it with apt-get then I get all the server nonsense installed and I just want to access it remotely using ssh. For that I just need a working binary of cvs on my path...

When you try and compile cvs you will get the error:

In file included from getline.c:25:0:
getline.h:15:3: error: conflicting types for ‘getline’
getline __PROTO ((char *_lineptr, size_t _n, FILE *_stream));

This is because the bundled version of getline is incompatible with the newer library versions of getline. The fix is to make the cvs rename getline to get_line in its source files so it uses its private version rather than the system version. This is a one line sed command run from the cvs-1.11.23 directory that will do that for you:

sed -i 's/getline /get_line /' lib/getline.{c,h}

You can then run configure, and make as normal.

As an aside, I recently had to do this on a Mac and the syntax for the sed command is slightly different:

sed -I -e 's/getline /get_line /' lib/getline.{c,h}

https://boffinblogger.blogspot.com/2018/06/cvs-11123-fix.html
January 29, 2025 at 10:43:34 AM EST *
cvs
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community