Bug #43136 "perror" should be part of a server make, not client
Submitted: 24 Feb 2009 10:33 Modified: 13 Oct 2016 11:27
Reporter: Joerg Bruehe Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0 and up OS:Any
Assigned to: CPU Architecture:Any

[24 Feb 2009 10:33] Joerg Bruehe
Description:
To test a code change specific to the client side, I did the following:

1) Run a full build
2) test it: success
3) run a build "--without-server"
4) test it: an NDB test fails because "perror" doesn't handle NDB error codes.

While it is safe to ignore that test failure, it shows a bug in our Makefiles:
"perror" is (AIUI) a tool to explain server error codes, so it should be built with the server only and not with the clients.
This is also the way our RPM spec files handle it: "perror" is part of the "server" RPMs, not the "client" ones.

How to repeat:
configure --without-server ; make
"perror" will be built.

Suggested fix:
Currently, subdirectory "extra" will participate in a make run if either server or client are built.

If this is necessary (not checked), and we don't want to shuffle source files into different directories (I assume so), I propose we should make more use of conditional make, like we already do for InnoDB:

  # "innochecksum" should be switched
  if BUILD_INNODB_TOOLS
  bin_PROGRAMS += innochecksum
  endif

In a similar line, we could introduce "BUILD_SERVER" and "BUILD_CLIENT",
use them throughout all our "Makefile.am"s,
and so get rid of the varying list of directories (by client vs server build), rather explicitly control the list of targets.