Bug 237818 - sysutils/bareos-client: Fails to build with PYTHON option enabled (when 2.7 isn't DEFAULT_VERSION)
Summary: sysutils/bareos-client: Fails to build with PYTHON option enabled (when 2.7 i...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-05-10 04:08 UTC by beldin
Modified: 2019-05-11 01:56 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments
Build log 1 or 4 (146.52 KB, text/plain)
2019-05-10 05:08 UTC, beldin
no flags Details
Build log 2 of 4 (146.87 KB, text/plain)
2019-05-10 05:09 UTC, beldin
no flags Details
Build log 3 of 4 (146.52 KB, text/plain)
2019-05-10 05:11 UTC, beldin
no flags Details
Build log 4 of 4 - the one that worked (149.96 KB, text/plain)
2019-05-10 05:14 UTC, beldin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description beldin 2019-05-10 04:08:23 UTC
When building sysutils/bareos-client in a clean enviroment (e.g. poudriere) the PYTHON configuration option does not work quite as expected when the DEFAULT_VERSION of python is 3.6.

When the option is ON it naturally pulls in the DEFAULT_VERSION which fails since it seems bareos-client wants python2.7.

Modifying sysutils/bareos-server/Makeifle so that USES+=python:2.7 fixed this.

However then when the option is OFF the dependancy of ninja pulls in the default python version which bareos-client's cmake detects anyway and attempts to build with python support anyway, failing.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-10 04:19:25 UTC
Does this software support Python 2 *and* 3, or only 2 at this time?

Could you include the full build log of the failure, as an attachment please
Comment 2 beldin 2019-05-10 05:08:06 UTC
Created attachment 204295 [details]
Build log 1 or 4

unmodified ports
DEFAULT_VERSION+=python=3.6
PYTHON disabled in bareos-client port options

dependancy of ninja pulls in python3.6, it's detected, enabled and fails.
Comment 3 beldin 2019-05-10 05:09:40 UTC
Created attachment 204296 [details]
Build log 2 of 4

unmodified ports
DEFAULT_VERSION+=python=3.6
PYTHON enbaled in bareos-client options

Again it detects python3.6, uses it and fails.
Comment 4 beldin 2019-05-10 05:11:13 UTC
Created attachment 204297 [details]
Build log 3 of 4

modifed sysutils/bareos-server/Makefile line 68:

PYTHON_USES=python:2.7

DEFAULT_VERSION=python=3.6
PYTHON disabled in port options.

Again python3.6 pulled in by ninja dependancy, detected by cmake and enabled causing failure of build.
Comment 5 beldin 2019-05-10 05:14:25 UTC
Created attachment 204298 [details]
Build log 4 of 4 - the one that worked

modifed sysutils/bareos-server/Makefile line 68:

PYTHON_USES=python:2.7

DEFAULT_VERSION=python=3.6
PYTHON enabled in port options.

Pulls in python2.7 for itself which cmake detects and uses, working.

(python3.6 is still in the system, but the detection prefers 2.7)

bareos-client needs 2.7, but will use 3.6 if it's there even if you turn off python in the options menu.
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-05-10 20:20:03 UTC
A commit references this bug:

Author: acm
Date: Fri May 10 20:19:43 UTC 2019
New revision: 501197
URL: https://svnweb.freebsd.org/changeset/ports/501197

Log:
  - Fix pthread error [1]
  - Fix build when python 2.x is not default version [2]
  - Fix build when NLS option is not selected [3]
  - Fix pkg-plist
  - Few other modifications

  PR:		237818 237823 237825
  Submitted by:	Trond.Endrestol _ at _ ximalas.info [1][3], beldin _ at _ beldin.org [2]
  Reported by:	pkg-fallout

Changes:
  head/sysutils/bareos-server/Makefile
  head/sysutils/bareos-server/files/patch-core-CMakeLists.txt
  head/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake
  head/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake
  head/sysutils/bareos-server/files/patch-core-src-include_baconfig.h
  head/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt
  head/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
  head/sysutils/bareos-server/pkg-plist