Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probable typo in "php" bottle configuration #150214

Closed
4 tasks done
srigi opened this issue Oct 8, 2023 · 4 comments
Closed
4 tasks done

Probable typo in "php" bottle configuration #150214

srigi opened this issue Oct 8, 2023 · 4 comments
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity

Comments

@srigi
Copy link

srigi commented Oct 8, 2023

brew gist-logs <formula> link OR brew config AND brew doctor output

# brew config
HOMEBREW_VERSION: 4.1.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: affc4c01aada2c973b63e084e7696e896edf2b7b
Last commit: 7 days ago
Core tap JSON: 08 Oct 20:42 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BROWSER: open
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.42.0 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 13.6-arm64
CLT: 15.0.0.0.1.1694021235
Xcode: 15.0
Rosetta 2: false

# brew doctor
Your system is ready to brew.

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

PHP info page (<?php phpinfo();) returns invalid iconv support:

Screenshot 2023-10-08 at 22 57 43

What happened (include all command output)?

I believe there is a typo on this line:

--with-iconv#{headers_path}

The configuration directive should contains the = char as described here.

What did you expect to happen?

Iconv support should be reported without unknown values for iconv implementation and iconv library version directives.

Step-by-step reproduction instructions (by running brew commands)

brew install php
php -i | grep iconv
@srigi srigi added the bug Reproducible Homebrew/homebrew-core bug label Oct 8, 2023
@Bo98
Copy link
Member

Bo98 commented Oct 8, 2023

headers_path has the =:

headers_path = "=#{MacOS.sdk_path_if_needed}/usr" if OS.mac?

A little confusing to read I realise.

If this was macOS 14, it would make sense since Apple changed the iconv implementation from GNU iconv to Citrus iconv (from FreeBSD) and it's possible PHP doesn't support detecting this yet.

But it seems you're runnning macOS 13, so we will need to investigate build logs. The issue seems however largely cosmetic.

@cho-m
Copy link
Member

cho-m commented Oct 9, 2023

Sounds related to upstream issue php/php-src#10751 which has fix in HEAD.

Snippet of previous php PR run:

configure:44346: checking if using GNU libiconv
configure:44365: clang -o conftest  -I/private/tmp/php-20230928-8112-fa75td/php-8.2.11/ext/date/lib -I/opt/homebrew/Cellar/openssl@3/3.1.3/include -I/opt/homebrew/Cellar/pcre2/10.42/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/Cellar/curl/8.3.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi -I/opt/homebrew/Cellar/gd/2.3.3_6/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/gmp/include -g -O2 -fvisibility=hidden  -D_GNU_SOURCE   -Wl,-rpath,/opt/homebrew/Cellar/krb5/1.21.2/lib -L/opt/homebrew/Cellar/krb5/1.21.2/lib -Wl,-rpath,/opt/homebrew/Cellar/openssl@3/3.1.3/lib -L/opt/homebrew/Cellar/openssl@3/3.1.3/lib -Wl,-rpath,/opt/homebrew/Cellar/pcre2/10.42/lib -L/opt/homebrew/Cellar/pcre2/10.42/lib -Wl,-rpath,/opt/homebrew/opt/sqlite/lib -L/opt/homebrew/opt/sqlite/lib -Wl,-rpath,/opt/homebrew/Cellar/curl/8.3.0/lib -L/opt/homebrew/Cellar/curl/8.3.0/lib -Wl,-rpath,/opt/homebrew/Cellar/gd/2.3.3_6/lib -L/opt/homebrew/Cellar/gd/2.3.3_6/lib -Wl,-rpath,/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/gettext/lib -Wl,-rpath,/opt/homebrew/opt/gmp/lib -L/opt/homebrew/opt/gmp/lib conftest.c -liconv -lgmp -lintl -lbz2 -lnetwork -lm  -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lpcre2-8 -lsqlite3 -lz -lcurl -lxml2 -lffi -lssl -lcrypto -lgd >&5
conftest.c:280:3: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  printf("%d", _libiconv_version);
  ^
conftest.c:280:3: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
1 error generated.

@Bo98
Copy link
Member

Bo98 commented Oct 9, 2023

Yep, that'll be it.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Oct 30, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Dec 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

3 participants