Can't compile older versions of BK



we’re using the commercial editiion of BK and want to switch to opensource version
i’m trying to compile the open source version, which is 5.4.6

when i download the source and try to compile, it fails like this :

$> make p
root: cannot find package root.
root: cannot find package root.
make CFLAGS=" -g -O2 -Wall -Wno-parentheses -Wno-char-subscripts -Wno-format-y2k -Wstrict-prototypes -Wchar-subscripts -Wredundant-decls -Wextra -Wno-pointer-sign -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wpointer-arith " all
make[1]: Entering directory '/homes/dann/repository/packages/bitkeeper/source/bitkeeper-bk-5.4.1/src'
root: cannot find package root.
root: cannot find package root.
make[2]: Entering directory '/homes/dann/repository/packages/bitkeeper/source/bitkeeper-bk-5.4.1/src/libc'
fslayer/Makefile:7: fslayer/fslayer.makefile: No such file or directory
perl fslayer/
bk get -qS system.h
touch system.h
CC libc/fslayer/fslayer_open_stub.c
CC libc/fslayer/fslayer_close_stub.c
CC libc/fslayer/fslayer_read_stub.c
CC libc/fslayer/fslayer_write_stub.c
CC libc/fslayer/fslayer_lseek_stub.c
CC libc/fslayer/fslayer_lstat_stub.c
CC libc/fslayer/fslayer_fstat_stub.c
CC libc/fslayer/fslayer_stat_stub.c
CC libc/fslayer/fslayer_unlink_stub.c
CC libc/fslayer/fslayer_rename_stub.c
CC libc/fslayer/fslayer_chmod_stub.c
CC libc/fslayer/fslayer_link_stub.c
CC libc/fslayer/fslayer_symlink_stub.c
CC libc/fslayer/fslayer__getdir_stub.c
CC libc/fslayer/fslayer_access_stub.c
CC libc/fslayer/fslayer_utime_stub.c
CC libc/fslayer/fslayer_mkdir_stub.c
CC libc/fslayer/fslayer_rmdir_stub.c
CC libc/fslayer/fslayer_rmIfRepo_stub.c
CC libc/fslayer/fslayer_realBasename_stub.c
CC libc/hash/hash.c
CC libc/hash/hash_tostr.c
CC libc/hash/hash_tofile.c
CC libc/hash/memhash.c
CC libc/hash/wrapmdbm.c
CC libc/mdbm/mdbm.c
CC libc/mdbm/hash.c
CC libc/mdbm/debug.c
CC libc/mdbm/byte_order.c
mdbm/byte_order.c: In function ‘_htonl’:
mdbm/byte_order.c:56:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  return (*(uint32 *)p);
CC libc/regex/regex.c
CC libc/regex/re_fail.c
make[2]: *** No rule to make target 'string/bzero.c', needed by 'string/bzero.o'.  Stop.
make[2]: Leaving directory '/homes/dann/repository/packages/bitkeeper/source/bitkeeper-bk-5.4.1/src/libc'
Makefile:381: recipe for target 'libc/libc.a' failed
make[1]: *** [libc/libc.a] Error 2
make[1]: Leaving directory '/homes/dann/repository/packages/bitkeeper/source/bitkeeper-bk-5.4.1/src'
Makefile:285: recipe for target 'p' failed
make: *** [p] Error 2

some of the files are not even here in the package… is the tar.gz available has been tested ? i don’t think it will compile anywhere… is there any way to make this works ?

i have no issue compiling the latest version of bk but it’s not compatible with our tools.

thanks for your help ! :slight_smile:


Bah! Notifications were broken by the latest release of discourse so we never saw this.
My apologies, the problem is fixed now. You should have gotten a “summary from your last visit” email today.

I can assure you that the source release does work, but it takes some tweaks on some platforms. You totally forgot to mention what kind of machine you are using to compile. Based on your output I am going to guess it is some sort of BSD machine where ‘make’ is not GNU make. Using ‘gmake’ is a requirement as mentioned in the README.

You stumbled into src/libc/string/ which is a leftover and unused file. Install gmake and try again, then include the OS and version if you are still having problems.



thanks for your answer.

i am using debian 8 jessie stable, where gnu make is the default.

i tried downloading bk 5.4.6 again but of course no luck, still complaining about files not found (like in the OP)

$ dpkg -l|grep make
ii make 4.0-8.1 amd64 utility for directing compilation


Wait a minute, I think I have been missing something.

i’m trying to compile the open source version, which is 5.4.6

and later

i tried downloading bk 5.4.6 again

The current open source release of bk is version bk-7.31ce. And the download location for that is here:

When you say you downloaded 5.4.6, do you mean you ran something like this:

bk clone -rbk-5.4.6 bk:// bk-5.4.6


If so that won’t work. That doesn’t compile and it doesn’t include all the code needed to build the commercial version.

I assumed you were currently using bk-5.4.6 and were trying to compile the community edition.


i would like to compile 5.4.6 specifically because it’s the same version we use commercially and it’s integrated with our tools already.

there’s no problem compiling latest version btw :slight_smile:

i downloaded 5.4.6 from here :

extracted, cd bitkeeper/src
and then run :
make p


Yeah, bk-5.4.6 is only available commercially and as you found it can’t be built from that source.

Github is just a clone of the open source bk’s source. It is generating incorrect information by suggesting that the 5.4.6 ‘release’ actually works. I can’t really fix that without removing the 5.4.6 tag which is useful information.


As Wayne said, what you are trying to do won’t work. It took a lot of work to make BK compile without a BK repo around it. Compiling versions earlier than bk-7.0 won’t work (and I think 7.0 was problematic, you can look through the source history to see).


thanks guys
so… we’re moving to 7.3.1 :slight_smile:

i’ll close this thread


You’ll like it better than 5.x, read the release notes. Lots of goodness in there.