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

may not want Xlib #9

Closed
yinwang0 opened this issue Apr 26, 2016 · 9 comments
Closed

may not want Xlib #9

yinwang0 opened this issue Apr 26, 2016 · 9 comments
Assignees

Comments

@yinwang0
Copy link

yinwang0 commented Apr 26, 2016

After configure and make, I'm getting this error complaining that I don't have Xlib on my mac. I needed to install XQuartz for it to build.

Chez Scheme is a compiler. It may be confusing that the build includes graphics stuff by default. Many people may not want to have X11 on the mac, so maybe it's good to have an option to skip the build of X11 related things?

Or even better, the configure script can check whether the user have X11 and skip the build for that part if they don't have it.

gcc -m64 -Wpointer-arith -Wall -Wextra -O2 -I/opt/X11/include/ -c -DX86_64 -I../boot/a6osx -I../zlib expeditor.c
expeditor.c:846:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^
1 error generated.
@johnwcowan
Copy link

It's not just a compiler, it's also a run-time library including SWL and the optional SWL-based IDE.

@yinwang0
Copy link
Author

I know it contains a GUI library and an IDE, but from a user's perspective, they only care about the compiler. Most people would just want to use it in the terminal or with Emacs or VIM, and not doing any GUI programming. So if the GUI and IDE can be made optional from configure, then the build process may be smoother.

It's a minor issue though. If it can be done easily then I think it's worth doing.

@dybvig
Copy link
Member

dybvig commented Apr 28, 2016

X11 include files are for the expression editor (expeditor), not for SWL, which takes care of its own dependencies (assuming it still works). The expression editor uses it as a way to support paste (^V) if the corresponding dynamic library is available at run time. Commenting out line 283 of version.h:

#define LIBX11 "/usr/X11R6/lib/libX11.dylib"

should disable the includes. They could be disabled automatically by configure when the include files don't exist, as Yin suggests.

@yinwang0
Copy link
Author

I just tried the expression editor and it's awesome!

I tried Cmd-C and Cmd-V (not Ctrl-V) on a mac, and it seems to work well without turning on XQuartz server. So I guess the X11 library is only for copy and paste from a X11 program?

Since it's rare to run a X11 program on Mac, maybe this can indeed be made optional.

@michaelballantyne
Copy link

It seems like the X11 dependency and the expression editor's support for paste is only relevant if Chez is not running within a terminal emulator that itself supports pasting.

Pasting with CMD-V in iTerm or with the middle mouse button in the X11 terminal on OS X and in Konsole on Linux work without the X11 support. The CTRL-Y action doesn't seem to need X11.

@dybvig Are there environments where having paste support built in to the expeditor rather than provided by the terminal emulator is important?

@dybvig
Copy link
Member

dybvig commented May 27, 2016

Alternative paste methods notwithstanding, in order for the X Windows experience to be the same on all machines, using Control-V in an X terminal must paste text selected in the same or another X application, which requires X Windows support to be compiled in. When we were doing the builds, we made sure the X11 header files were available on the build machine. What we probably need now is for X Windows support to be disabled via a configure option, which we would ask those who create binary packages not to use (implying they should also have the X11 header files in place). That would allow people to build their own binaries without X Windows support while those who install packages get the X Windows support if they've also installed XQuartz. (libX11.dylib is loaded dynamically if present at the first Control-V, so a binary built with X11 support can run with or without XQuartz installed )

@dybvig dybvig self-assigned this May 27, 2016
@tisonkun
Copy link
Contributor

With ab43608 and b4793db, Xlib now is auto-detected while configuring and be a option. It would address this specific issue.

cc @dybvig @yinwang0

@jltaylor-us
Copy link
Contributor

Was this issue resolved with #331 ?

@tisonkun
Copy link
Contributor

tisonkun commented Jun 9, 2021

I think so. But I am not one of the maintainer or collaborator who is able to close the issue :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants