Git Product home page Git Product logo

Comments (5)

acole42 avatar acole42 commented on August 24, 2024

What's also odd is if I used either the arm64_ventura bottle of krb5 or brew install --build-from-source krb5 I run into the segfault issue. Yet if I download krb5-1.21.2 and compile the libraries separately using the same flags as brew and inject the compiled libraries into DYLD_LIBRARY_PATH I don't run into the segfault issue.

~/Projects/krb5-1.21.2/src ❯ ./configure
--disable-debug \
--disable-dependency-tracking \
--prefix=/opt/homebrew/Cellar/krb5/1.21.2 \
--libdir=/opt/homebrew/Cellar/krb5/1.21.2/lib \
--disable-nls \
--disable-silent-rules \
--without-system-verto \
--without-keyutils

❯ make
❯ DYLD_LIBRARY_PATH=$HOME/Projects/krb5-1.21.2/src/lib DYLD_PRINT_LIBRARIES=1  psql -h 127.0.0.1  -d postgres 2>&1 | egrep "krb5|libpq"
dyld[64127]: <15D9A190-BFBD-395C-8EA0-8ACFABB691DF> /opt/homebrew/Cellar/postgresql@14/14.12/lib/postgresql@14/libpq.5.14.dylib
dyld[64127]: <E2647C09-805E-348D-B795-4A109272481E> ~/Projects/krb5-1.21.2/src/lib/gssapi/libgssapi_krb5.2.2.dylib
dyld[64127]: <4A29A8C7-9A5B-3FB9-98FB-3DFDBF6EC43E> ~/Projects/krb5-1.21.2/src/lib/krb5/libkrb5.3.3.dylib
dyld[64127]: <3D7EA99D-B924-3082-934F-32667A2271AE> ~/Projects/krb5-1.21.2/src/lib/crypto/libk5crypto.3.1.dylib
dyld[64127]: <A6C7A90F-BF45-32E5-9CF7-9D2940CE025E> ~/Projects/krb5-1.21.2/src/util/et/libcom_err.3.0.dylib
dyld[64127]: <0926D154-AE40-32DD-8043-44096D720683> ~/Projects/krb5-1.21.2/src/util/support/libkrb5support.1.1.dylib

psql (14.12 (Homebrew))
Type "help" for help.

postgres=#

from homebrew-core.

carlocab avatar carlocab commented on August 24, 2024

Could you share the link from doing

brew install --build-from-source krb5
brew gist-logs krb5

?

from homebrew-core.

cho-m avatar cho-m commented on August 24, 2024

Maybe https://krbdev.mit.edu/rt/Ticket/Display.html?id=9103 based on stack trace?

If so, could try krb5/krb5@635c8cc

from homebrew-core.

acole42 avatar acole42 commented on August 24, 2024

@carlocab Here's the output from the requested commands.

❯ brew install --build-from-source krb5
==> Fetching krb5
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/f9e9b8fb55aef222c500f8a94a948b3c437afe67/Formula/k/krb5.rb
##################################################################################################################################################################### 100.0%
==> Downloading https://kerberos.org/dist/krb5/1.21/krb5-1.21.2.tar.gz
Already downloaded: ~/Library/Caches/Homebrew/downloads/36ed7af4db98b395a891105a34041859cec149be294a1dc35492d16153b905c9--krb5-1.21.2.tar.gz
==> ./configure --disable-nls --disable-silent-rules --without-system-verto --without-keyutils
==> make
==> make install
==> Caveats
krb5 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have krb5 first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/krb5/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/opt/homebrew/opt/krb5/sbin:$PATH"' >> ~/.zshrc

For compilers to find krb5 you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/krb5/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/krb5/include"

For pkg-config to find krb5 you may need to set:
  export PKG_CONFIG_PATH="/opt/homebrew/opt/krb5/lib/pkgconfig"
==> Summary
🍺  /opt/homebrew/Cellar/krb5/1.21.2: 163 files, 5.1MB, built in 49 seconds
==> Running `brew cleanup krb5`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

❯ psql -d postgres -h 127.0.0.1
[1]    49904 segmentation fault  psql -d postgres -h 127.0.0.1
 brew gist-logs krb5

https://gist.github.com/acole42/298db6f4f2f4de36047eb4e4790e51ad

@cho-m
I compiled the latest commit from the master branch on krb5/krb5 which included krb5/krb5@635c8cc. When I injected the compiled libraries in DYLD_LIBRARY_PATH I didn't encounter the segfault. It seems like that commit fixes the bug.

I'm still puzzled why compiling the same version (krb5-1.21.2 ) as the krb5 formula, which doesn't have the referenced fix krb5/krb5@635c8cc, works fine if I compile it separately without brew but segfaults when I have brew compile the library.

from homebrew-core.

github-actions avatar github-actions commented on August 24, 2024

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

from homebrew-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.