Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757309 - dev-vcs/git-2.29.2: tries to append library paths on Darwin
Summary: dev-vcs/git-2.29.2: tries to append library paths on Darwin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-28 03:28 UTC by Sam James
Modified: 2021-03-18 09:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-28 03:28:17 UTC
I noticed when building:
x86_64-apple-darwin20-gcc -o t/helper/test-subprocess.o -c -MF t/helper/.depend/test-subprocess.o.d -MQ t/helper/test-subprocess.o -MMD -MP    -march=native -O2 -pipe -Wall -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -I/usr/local/include -I/usr/local/opt/gettext/include -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2  -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DUSE_ST_TIMESPEC -DSHA1_BLK -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_NS_GET_EXECUTABLE_PATH -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DNO_MEMMEM -Icompat/regex -DSHELL_PATH='"/Users/sam/Gentoo/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  t/helper/test-subprocess.c
x86_64-apple-darwin20-gcc -o t/helper/test-trace2.o -c -MF t/helper/.depend/test-trace2.o.d -MQ t/helper/test-trace2.o -MMD -MP    -march=native -O2 -pipe -Wall -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -I/usr/local/include -I/usr/local/opt/gettext/include -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2  -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DUSE_ST_TIMESPEC -DSHA1_BLK -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_NS_GET_EXECUTABLE_PATH -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DNO_MEMMEM -Icompat/regex -DSHELL_PATH='"/Users/sam/Gentoo/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  t/helper/test-trace2.c
x86_64-apple-darwin20-gcc -o t/helper/test-urlmatch-normalization.o -c -MF t/helper/.depend/test-urlmatch-normalization.o.d -MQ t/helper/test-urlmatch-normalization.o -MMD -MP    -march=native -O2 -pipe -Wall -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -I/usr/local/include -I/usr/local/opt/gettext/include -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2  -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DUSE_ST_TIMESPEC -DSHA1_BLK -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_NS_GET_EXECUTABLE_PATH -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DNO_MEMMEM -Icompat/regex -DSHELL_PATH='"/Users/sam/Gentoo/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  t/helper/test-urlmatch-normalization.c
x86_64-apple-darwin20-gcc -o t/helper/test-wildmatch.o -c -MF t/helper/.depend/test-wildmatch.o.d -MQ t/helper/test-wildmatch.o -MMD -MP    -march=native -O2 -pipe -Wall -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -I/usr/local/include -I/usr/local/opt/gettext/include -DGIT_HOST_CPU="\"x86_64\"" -DUSE_LIBPCRE2  -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DUSE_ST_TIMESPEC -DSHA1_BLK -DSHA256_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DHAVE_NS_GET_EXECUTABLE_PATH -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DNO_MEMMEM -Icompat/regex -DSHELL_PATH='"/Users/sam/Gentoo/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  t/helper/test-wildmatch.c
...

Notice the /usr/local/incclude and /usr/local/opt/gettext/include. It's true that these paths exist - but I don't want to use things from outside my prefix.

I'll prepare a patch $soon.

config.mak.uname has:
        # Workaround for `gettext` being keg-only and not even being linked via
        # `brew link --force gettext`, should be obsolete as of
        # https://github.com/Homebrew/homebrew-core/pull/53489
        ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y)
                BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include
                BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib
                ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
                        MSGFMT = /usr/local/opt/gettext/bin/msgfmt
                endif
        endif
Comment 1 Larry the Git Cow gentoo-dev 2021-03-18 09:21:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58774f4fbb1570837c6314c134ce5af38811c21c

commit 58774f4fbb1570837c6314c134ce5af38811c21c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-16 15:33:04 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-03-18 09:21:13 +0000

    dev-vcs/git: don't search outside of prefix for gettext on Darwin
    
    Conditionally patching so that non-prefix developers don't have
    to rebase on new versions.
    
    We can apply this unconditionally safely if desired though.
    
    Closes: https://bugs.gentoo.org/757309
    Signed-off-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/19954
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 .../files/git-2.31.0-darwin-prefix-gettext.patch   | 22 ++++++++++++++++++++++
 dev-vcs/git/git-2.31.0-r1.ebuild                   |  5 +++++
 dev-vcs/git/git-9999-r1.ebuild                     |  5 +++++
 dev-vcs/git/git-9999-r2.ebuild                     |  5 +++++
 dev-vcs/git/git-9999-r3.ebuild                     |  5 +++++
 dev-vcs/git/git-9999.ebuild                        |  5 +++++
 6 files changed, 47 insertions(+)