Skip to content

On FreeBSD, gmake instead of make should be used #650

Description

@matuscak

I have tried running

pie install mongodb/mongodb-extension

on FreeBSD what resulted to following error:

make: /root/.pie/php8.5_e5f4aa0c439f2f7b3b779be755bdf64c/vendor/mongodb/mongodb-extension/mongodb-2.3.3/Makefile:208: warning: Invalid character " " in variable name "realpath /usr/local/lib/php/20250925/json.so"

On FreeBSD, simple make command runs BSD make, which is available as a part of base system on /usr/bin/make path.

GNU make has to be installed as a package, its installation path is /usr/local/bin/gmake and could be run as a gmake command.

As a test and workaround, I made a temporary symlink /sbin/make -> /usr/local/bin/gmake which caused that executing make runs GNU make, as expected by pie. After this change I was able to run

pie install mongodb/mongodb-extension

without any issue.

So, to solve this bug, pie should do some test to detect its environment and choose between make and gmake correctly. It could be running uname to detect FreeBSD as an OS, it could be running make -v and gmake -v and check for "GNU make" string, or something similar.

Or, at least, command line option called --with-make-path should be added, like there are similar options for phpize, php-config and php.

Maybe it would be good to do both.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmaintainer investigatingThis ticket is being investigated by maintainers. Please check with us before contributing PRs etc!
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions