bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doubt about plotting on MAC OS X Catalina


From: Dr . Jürgen Sauermann
Subject: Re: Doubt about plotting on MAC OS X Catalina
Date: Thu, 28 Nov 2019 13:21:44 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi,

I would at least expect something like

 
CXXFLAGS="-I /opt/X11/include" ./configure

(if that is the directory where your header files live).

Best Regards,
Jürgen


On 11/28/19 1:05 PM, Antonio Juan wrote:
So I need to change

CXXFLAGS="-I /opt/X11" ./configure

With this I not get anything

I'm not sure where to point I have the X11 in my /opt/X11

export PKG_CONFIG_PATH=/usr/local/Cellar/gtk+/2.24.32_3/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/cairo/1.16.0_2/lib/pkgconfig

Thanks for your time

El 28 nov 2019, a las 12:54, Dr. Jürgen Sauermann <address@hidden> escribió:

Hi Antonio,

For X11 and friend to work you need two different things:

1. header files, e.g.
xcb.h, Xlib.h, etc.
2. library files, e.g. libxcb.so.1, libX11.so.6, etc.

These days libraries are often shipped in two different packages: one that
contains only the (shared) libraries and the other package contains the
corresponding header files. That second packages normally ends with "-dev".

For example (output from aptitude search libx11):

i   libx11-6                        - X11 client-side library
i   libx11-dev                      - X11 client-side library (development headers)

In your case the ./configure script cannot find the header files which means that either the  the -dev package
was not installed, or they were installed in an unusual place. In the latter case you can
tell ./configure where else to look, for example:

CXXFLAGS = -I /usr/somewhere_else ./configure [other configure options...]

Best Regards,
Jürgen Sauermann


On 11/28/19 12:33 PM, Antonio Juan wrote:
Hi i will check,

The compilation ended, and done sudo make install, but I still have the same problem 

      ⎕PLOT 1 2 3 4 5
SYNTAX ERROR+
∩      ⎕PLOT 1 2 3 4 5
      ^
      )MORE
⎕PLOT is not available because one or more of its build prerequisites (in
particular libX11.so) was missing, or because it was explicitly
 disabled in ./configure.

But different from the first one, it was no libxcb library was found, I suspect that at this point I also need to change something in the configure in order to compile with X11
Which I get:
checking xcb/xcb.h usability... no
checking xcb/xcb.h presence... no
checking for xcb/xcb.h... no
checking X11/Xlib.h usability... no
checking X11/Xlib.h presence... no
checking for X11/Xlib.h... no
checking X11/Xlib-xcb.h usability... no
checking X11/Xlib-xcb.h presence... no
checking for X11/Xlib-xcb.h... no
checking X11/Xutil.h usability... no
checking X11/Xutil.h presence... no
checking for X11/Xutil.h... no

Thanks for your help



El 28 nov 2019, a las 12:22, Dr. Jürgen Sauermann <address@hidden> escribió:

Hi again,

another thing that you may want to check is that your config.h (which is
generated by ./configure) contains the following lines:

/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif


Best Regards,
Jürgen


On 11/28/19 12:11 PM, Dr. Jürgen Sauermann wrote:
Hi Antonio,

that seems to be an incompatibility between the commonly used libs and the Apple libs.
Nothing that I could (or should) do anything about in GNU APL. As far as I can see you could
probably remove the 
POLLRDHUP without much harm so that the offending line reads:

pfd.events = POLLIN;

Best Regards,
Jürgen


On 11/28/19 11:58 AM, Antonio Juan wrote:
Hi thanks, I thinks that will be important to put the output of this things:

...
...
A    gnu-apl/install-sh
Checked out revision 1206.

➜ export PKG_CONFIG_PATH=/usr/local/Cellar/gtk+/2.24.32_3/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/cairo/1.16.0_2/lib/pkgconfig

➜ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/local/bin/ggrep
checking for egrep... /usr/local/bin/ggrep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-apple-darwin19.0.0
checking host system type... x86_64-apple-darwin19.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for fgrep... /usr/local/bin/ggrep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin19.0.0 file names to x86_64-apple-darwin19.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.0.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether g++ accepts -rdynamic... no
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for term.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking fftw3.h usability... yes
checking fftw3.h presence... yes
checking for fftw3.h... yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking ext/atomicity.h usability... no
checking ext/atomicity.h presence... no
checking for ext/atomicity.h... no
checking xcb/xcb.h usability... no
checking xcb/xcb.h presence... no
checking for xcb/xcb.h... no
checking X11/Xlib.h usability... no
checking X11/Xlib.h presence... no
checking for X11/Xlib.h... no
checking X11/Xlib-xcb.h usability... no
checking X11/Xlib-xcb.h presence... no
checking for X11/Xlib-xcb.h... no
checking X11/Xutil.h usability... no
checking X11/Xutil.h presence... no
checking for X11/Xutil.h... no
checking utmpx.h usability... yes
checking utmpx.h presence... yes
checking for utmpx.h... yes
checking for xcb/xproto.h... no
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for inline... inline
checking for int32_t... yes
checking for int64_t... yes
checking for off_t... yes
checking for size_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for error_at_line... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for floor... yes
checking for memset... yes
checking for munmap... yes
checking for pow... yes
checking for sqrt... yes
checking for strchr... yes
checking for strerror... yes
checking for socket in -lsocket... no
checking for yp_all in -lnsl... no
checking for setupterm in -lncurses... yes
checking for __atomic_fetch_add_4 in -latomicity... no
checking for backtrace in -lexecinfo... no
checking for acosh in -lm... yes
checking for sem_init in -lpthread... yes
checking for dlopen in -ldl... (cached) yes
checking for fftw_plan_dft in -lfftw3... yes
checking for xcb_connect in -lxcb... no
checking for XOpenDisplay in -lX11... no
checking for XGetXCBConnection in -lX11-xcb... no
checking for SQLite3 library >= 3.0.0... yes
cat: /include/sqlite3.h: No such file or directory
./configure: line 18214: test: !=: unary operator expected
configure: WARNING: Cannot find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!
checking for pg_config... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XCBLIBS... yes
checking for pcre2_compile_32 in -lpcre2-32... yes
checking for GTK... yes
checking whether CPU has rdtsc (read CPU cycle counter) opcode... yes
checking whether sem_init() works... no
checking whether pthread_setaffinity_np is available... no
checking whether OSAtomicAdd32Barrier() is available... no
checking whether atomic_add_32_nv() is available... no
checking if we are compiling for Android... no
checking if we want to build an erlang interface (implies libapl.so)... no
checking if we want to build libapl.so... no
checking if we want to build libpython_apl.so... no
checking whether internal performance counters shall be enabled)... no
checking whether to remember the history of APL values (debug feature)... no
checking whether gprof profiling shall be enabled... no
checking whether gcov coverage testing shall be enabled... no
checking whether dynamic logging shall be enabled... no
checking whether value flags shall be traced... no
checking how picky internal tests shall be... 1
checking security level (0=none, 1=configured in preferences, 2=all)... 0
checking how many CPU cores shall be used by APL (experimental!)... 0
checking which type of socket APserver shall use... 0
checking which port number APserver shall use for TCP or UDP sockets... 16366
checking which port name APserver shall use for unix ports... /tmp/GNU-APL/APserver
checking how long a short APL value shall be at most... 12
checking whether visible markers shall be used... no
checking whether support for rational numbers is desired ... no
checking whether we compile for an i686 CPU... no

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating build/Makefile
config.status: creating debian/Makefile
config.status: creating debian/source/Makefile
config.status: creating doc/Makefile
config.status: creating erlang/Makefile
config.status: creating erlang/apl.erl
config.status: creating gnu-apl.d/Makefile
config.status: creating gnu-apl.d/preferences
config.status: creating HOWTOs/Makefile
config.status: creating rpm/Makefile
config.status: creating rpm/apl.spec
config.status: creating src/Makefile
config.status: creating src/APs/Makefile
config.status: creating src/Gtk/Makefile
config.status: creating src/emacs_mode/Makefile
config.status: creating src/native/Makefile
config.status: creating src/sql/Makefile
config.status: creating src/testcases/Makefile
config.status: creating src/workspaces/Makefile
config.status: creating support-files/Makefile
config.status: creating support-files/105-key-International-Keyboard/Makefile
config.status: creating support-files/Dirk/Makefile
config.status: creating support-files/Dyalog-Keyboard/Makefile
config.status: creating support-files/Juergen-Mint-19/Makefile
config.status: creating support-files/old-Keyboard/Makefile
config.status: creating support-files/OS-X-Keyboard/Makefile
config.status: creating support-files/Unicomp-Keyboard/Makefile
config.status: creating support-files/WASD-Keyboard/Makefile
config.status: creating tools/Makefile
config.status: creating websock/Makefile
config.status: creating websock/client/Makefile
config.status: creating websock/server/Makefile
config.status: creating workspaces/Makefile
config.status: creating wslib3/Makefile
config.status: creating wslib4/Makefile
config.status: creating wslib5/Makefile
config.status: creating wslib5/APLComponentFiles/Makefile
config.status: creating wslib5/iso-apl-cf/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

configure: creating ./src//buildtag.hh
*** svnversion not installed: keeping old buildtag
configure: creating ./src/makefile.h
configure: creating ./src/configure_args.cc

configure: saving configure options in ./configure_options

➜ make
...
After long long output
...

g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror      -g -O2 -MT apl-Quad_GTK.o -MD -MP -MF .deps/apl-Quad_GTK.Tpo -c -o apl-Quad_GTK.o `test -f 'Quad_GTK.cc' || echo './'`Quad_GTK.cc
Quad_GTK.cc:393:35: error: use of undeclared identifier 'POLLRDHUP'
         fds[w].events = POLLIN | POLLRDHUP;
                                  ^
Quad_GTK.cc:421:26: error: use of undeclared identifier 'POLLRDHUP'
   pfd.events = POLLIN | POLLRDHUP;
                         ^
2 errors generated.
make[3]: *** [apl-Quad_GTK.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I think that this could help, thanks for all your time

Sincerely,

Toni

El 28 nov 2019, a las 11:24, Dr. Jürgen Sauermann <address@hidden> escribió:

Hi Antonio,

I fixed the -Wreturn-type warning  in SVN 1206.

Best Regards,
Jürgen Sauermann


On 11/28/19 10:31 AM, Antonio Juan wrote:
Thanks for your replies I'm using OSX Catalina 10.15.1,

Like I commented, I have gnu-apl installed with homebrew and it works well except for the Plot feature.

So it was a problem with X11 and GTK, for the X11 Lib I need Xquartz from https://www.xquartz.org/
This puts the X11 on /opt/X11, I also have this strange behavior, that I asked on stack overflow: https://stackoverflow.com/questions/59072106/do-not-understanig-mac-osx-x11

Then I managed to Install Gtk with home-brew I installed gtk+ and gtk+3, like this:

export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
brew info gtk+3
gtk+3: stable 3.24.12 (bottled)

brew info gtk
gtk+: stable 2.24.32 (bottled), HEAD


Anf during make I get this error:

g++ -DHAVE_CONFIG_H -I. -I..    -Wall -I sql -Werror      -g -O2 -MT apl-Quad_PLOT.o -MD -MP -MF .deps/apl-Quad_PLOT.Tpo -c -o apl-Quad_PLOT.o `test -f 'Quad_PLOT.cc' || echo './'`Quad_PLOT.cc
Quad_PLOT.cc:79:1: error: control reaches end of non-void function
      [-Werror,-Wreturn-type]
}
^
1 error generated.
make[3]: *** [apl-Quad_PLOT.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I hope that I could explain it.


El 27 nov 2019, a las 16:48, Peter Teeson <address@hidden> escribió:

Hi:
The Macintosh operating system used to be called OS X 
Then it was renamed macOS. That was around the time Apple created a spin off iOS for their mobile devices.

So these days people refer to the hardware as Macs (both desktop and laptop)
And iPhone, iPad, iWatch for their mobile devices.

What make of Mac do you have? What version of macOS?

If you have questions I will try to help.

Peter

On Nov 27, 2019, at 7:12 AM, Dr. Jürgen Sauermann <mail@xn--jrgen-sauermann-zvb.de> wrote:

Hi,

there is a very nice description of how to install GNU APL on Macintosh written
by Peter Teeson. You can find in in the HOWTOs directory.

I don't know if Macintosh uses OSX, but Peters document is anyhow worthwhile reading.

BTW I have updated the ⎕PLOT error message to be more specific as to which library is missing.

Best Rgeards,
Jürgen Sauermann


On 11/27/19 12:32 PM, Antonio Juan wrote:
Thanks; I need to completely read the GNU-APL DOC, sorry about that

You are right the problem is with the libxcb.

⎕plot 1 2 3 4 5
SYNTAX ERROR+
      ⎕PLOT 1 2 3 4 5
      ^
      )MORE
⎕PLOT is not available because either no libxcb library was found on this
system when GNU APL was compiled, or because it was disabled in ./configure.

Exist a tutorials for building gnu-apl in OSX

Thanks for your time

Toni 

El 26 nov 2019, a las 17:27, Dr. Jürgen Sauermann <address@hidden> escribió:

Hi Toni,

the + character after
SYNTAX ERROR (or any other APL error) indicates that there
is more information available regarding that error. The additional information
can be displayed with command )MORE.

I suspect that in this particular case libraries needed for plotting (essentially libX11.so,
libxcb.so, and libX11-xcb.so) were missing on the platform where GNU APL was compiled
(i.e. your own machine if you compiled from source or the build machine of a package if
you installed a binary package).

For ⎕PLOT to work, you may need to compile the interpreter from source with the required
X libraries installed beforehand.

Best Regards,
Jürgen Sauermann


On 11/26/19 2:27 PM, Antonio Juan wrote:
Thanks for this awesome software. I have installed gnu plot 1.8 from brew package. It works well, and good integration with emacs. So it is a good environment for learning APL.

The only think is that when I try to plot I always get the following error:

       ⎕PLOT 0 1 ¯1 2 ¯2 3 ¯3
SYNTAX ERROR+
      ⎕PLOT 0 1 ¯1 2 ¯2 3 ¯3
      ^

I do not see anywhere, if is needed to load a workspace, or the needed for some environment configuration during installation. So really I do not know how to proceed.

Thanks for your time

Toni















reply via email to

[Prev in Thread] Current Thread [Next in Thread]