Giter Site home page Giter Site logo

Comments (5)

ardagnir avatar ardagnir commented on June 20, 2024

You might need to set it outside the shell or use export. The exact way environment variables are inherited seems to differ based on shell/os/etc, but this is a simple getenv call so it probably isn’t set at the level readline/zsh is reading it

from athame.

atsalolikhin-spokeo avatar atsalolikhin-spokeo commented on June 20, 2024

Thanks @ardagnir . I tried setting TMPDIR outside and inside the shell (both times with export TMPDIR=/tmp, but I am still getting the error that TMPDIR isn't set.

BTW, my shell is bash, not zsh. Does that matter?

from athame.

ardagnir avatar ardagnir commented on June 20, 2024

The shell shouldn't matter. Athame's not doing anything tricky to get tmpdir so it should work if it's set, but you can also just change athame.c:106 to hardcode the tmpdir. Just replace getenv(temp_dir_loc) with the value of TMPDIR

from athame.

atsalolikhin-spokeo avatar atsalolikhin-spokeo commented on June 20, 2024

Got it, thanks, @ardagnir .

When building Athame with ./readline_athame_setup.sh --prefix=$HOME/local/, I see:

/bin/sh ../support/shlib-install -O darwin20.3.0 -V apple -d /Users/atsalolikhin/git/athame/readline-8.0_tmp/../test/build/Users/atsalolikhin/local/lib -b /Users/atsalolikhin/git/athame/readline-8.0_tmp/../test/build/Users/atsalolikhin/local/bin -i "/Users/atsalolikhin/git/homebrew/bin/ginstall -c -m 644" libreadline.8.0.dylib
install: you may need to run ldconfig
Bash isn't set to use system readline or is not using readline 8. Setting up local bash for testing.
...
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"darwin20.3.0"' -DCONF_MACHTYPE='"x86_64-apple-darwin20.3.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"//share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I. -I/Users/atsalolikhin/git/athame/test/build/Users/atsalolikhin/local/include -I. -I./include -I./lib -I./lib/intl -I/Users/atsalolikhin/git/athame/bash-4.4_tmp/lib/intl  -g -O2 -Wno-parentheses -Wno-format-security -c y.tab.c
/usr/homes/chet/src/bash/src/parse.y:5741:21: error: implicit declaration of function 'count_all_jobs' is invalid in
      C99 [-Werror,-Wimplicit-function-declaration]
              temp = itos (count_all_jobs ());
                           ^
1 error generated.
make: *** [y.tab.o] Error 1

Make failed: Are you sure you have readline 8 installed? readline_athame_setup.sh installs readline 8 patched with athame. You may want to run it first.
This may also fail if you have a versionless libreadline.so symlinked to libreadline.so.7

Help?

I see this:

[~/git/athame] master(+1/-1) ±    find . -print |grep libreadline
./test/build/Users/atsalolikhin/local/lib/libreadline.8.0.dylib
./test/build/Users/atsalolikhin/local/lib/libreadline.a
./test/build/Users/atsalolikhin/local/lib/libreadline.8.dylib
./test/build/Users/atsalolikhin/local/lib/libreadline.dylib
./readline-8.0_tmp/shlib/libreadline.8.0.dylib
./readline-8.0_tmp/libreadline.a
[~/git/athame] master(+1/-1) ±

And this:

[~/git/athame] master(+1/-1) ± type bash
bash is /Users/atsalolikhin/git/homebrew/bin/bash
[~/git/athame] master(+1/-1) ± otool -L /Users/atsalolikhin/git/homebrew/bin/bash
/Users/atsalolikhin/git/homebrew/bin/bash:
        /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
        /Users/atsalolikhin/git/homebrew/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.7.0)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
        /usr/lib/libcharset.1.dylib (compatibility version 2.0.0, current version 2.0.0)
[~/git/athame] master(+1/-1) ±

Here is the system bash (which is older, which is why I use brew's bash instead):

[~/git/athame] master(+1/-1) ± otool -L /bin/bash
/bin/bash:
        /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
[~/git/athame] master(+1/-1) ±

I don't see readline:

[~/git/athame] master(+1/-1) ± find /usr/lib |grep readline
[~/git/athame] master(+1/-1) ±

from athame.

atsalolikhin-spokeo avatar atsalolikhin-spokeo commented on June 20, 2024

I just tried this again and I'm still getting:

$ ./readline_athame_setup.sh --prefix=$HOME/local/
...
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"darwin20.6.0"' -DCONF_MACHTYPE='"x86_64-apple-darwin20.6.0"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"//share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I. -I/Users/atsalolikhin/git/athame/test/build/Users/atsalolikhin/local/include -I. -I./include -I./lib -I./lib/intl -I/Users/atsalolikhin/git/athame/bash-4.4_tmp/lib/intl -I/Users/atsalolikhin/git/homebrew/opt/readline/include -g -O2 -Wno-parentheses -Wno-format-security -c y.tab.c
/usr/homes/chet/src/bash/src/parse.y:5741:21: error: implicit declaration of function 'count_all_jobs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
              temp = itos (count_all_jobs ());
                           ^
1 error generated.
make: *** [y.tab.o] Error 1

Make failed: Are you sure you have readline 8 installed? readline_athame_setup.sh installs readline 8 patched with athame. You may want to run it first.
This may also fail if you have a versionless libreadline.so symlinked to libreadline.so.7

Here is my libreadline:

[~/git/athame] master(+1/-1)+* ± ls -1  ~/git/homebrew/opt/readline/lib/*readline*
/Users/atsalolikhin/git/homebrew/opt/readline/lib/libreadline.8.1.dylib
/Users/atsalolikhin/git/homebrew/opt/readline/lib/libreadline.8.dylib
/Users/atsalolikhin/git/homebrew/opt/readline/lib/libreadline.a
/Users/atsalolikhin/git/homebrew/opt/readline/lib/libreadline.dylib
[~/git/athame] master(+1/-1)+* ±

I set the following variables per the output of brew info readline:


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

For pkg-config to find readline you may need to set:
  export PKG_CONFIG_PATH="/Users/atsalolikhin/git/homebrew/opt/readline/lib/pkgconfig"

from athame.

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.