Build Errors with Git

P. J. McDermott pjm at
Tue Sep 20 00:58:39 CEST 2011


I'm trying to build and install cgit on my Debian GNU/Linux
server, but I'm getting some compiler warnings and linker errors.  I
pulled cgit from the repository today (head: 756e3ea6), and this is what
I've done:
  ~$ git clone git://
  ~$ cd cgit/
  ~/cgit$ git submodule init
  ~/cgit$ $EDITOR .git/config
  (set "url" under submodule "git" to ""
  since is still down)
  ~/cgit$ git submodule update
  ~/cgit$ cd git/
  ~/cgit/git$ git checkout v1.7.2.5
  ~/cgit/git$ cd ../
  ~/cgit$ $EDITOR cgit.conf
  (see below)
  ~/cgit$ make
  ui-log.c: In function ‘print_commit’:
  ui-log.c:109: warning: implicit declaration of function
  ui-log.c: In function ‘cgit_print_log’:
  ui-log.c:323: warning: implicit declaration of function
  ui-log.o: In function `print_commit':
  /home/pj/cgit/ui-log.c:109: undefined reference to `graph_next_line'
  /home/pj/cgit/ui-log.c:222: undefined reference to `graph_next_line'
  ui-log.o: In function `cgit_print_log':
  /home/pj/cgit/ui-log.c:323: undefined reference to
  collect2: ld returned 1 exit status
  make: *** [cgit] Error 1

This is my 'cgit.conf':
  CGIT_SCRIPT_PATH = /var/www/cgit
  prefix = /usr/local

I checked out version of Git and set GIT_VER accordingly because
that is the version installed on my system.

I see that the declaration of 'graph_next_line()' was moved from
'graph.c' to 'graph.h' in Git in commit 6bdc17d9 last July, though for
whatever reason the change didn't get included in Git
Similarly, 'graph_set_custom_colors()' was added to Git in commit
1e3d4119 last July.  Should I just apply those two commits to my Git tree to build cgit?  Or is it safe to build cgit against a
version of Git different from the one installed?

Please CC me on replies.


P. J. McDermott
mailto:pjm at |

More information about the CGit mailing list