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: Elias Mårtenson
Subject: Re: Doubt about plotting on MAC OS X Catalina
Date: Thu, 28 Nov 2019 23:58:15 +0800

There is no ldf on OSX if I'm not mistaken. I think you have to use otool.

Do note that OSX doesn't behave much like a Unix, and newer version are even more limited. 

You probably need to add the correct compiler flags manually since its possible autotools doesn't handle it right. 

On Thu, 28 Nov 2019, 23:45 Dr. Jürgen Sauermann, <mail@jürgen-sauermann.de> wrote:
Hi,

try:

ldd apl

in the src directory to see if the apl binary find all its libraries. If not then you
need to configure and run ldconfig to tell the dynamic linker the place where
the shared libraries can be found. This is fairly platform dependant. It has no
relation to the header files (they are no longer needed after successful compilation).

Best Regards,
Jürgen Sauermann


On 11/28/19 4:00 PM, Antonio Juan wrote:
I will try that
I Have tried this.
LIBRARY_PATH=/opt/X11/lib:$LIBRARY_PATH CPPFLAGS="-I/opt/X11/include" LDFLAGS="-L/opt/X11/lib" ./configure

Compiled and it worked finally de interpreter can find the X11 but now giving a segmentation fault:

      ⎕PLOT 1 2 3 4
123145462255616
      

===================================================
SEGMENTATION FAULT

----------------------------------------
-- Stack trace at main.cc:88
----------------------------------------
0x0 @@@@
0xA  @@@@
0x0   @@@@
0x0    @@@@
0xA     @@@@
========================================
====================================================

Goodbye.
Session duration: 7.84882 seconds 

Process apl<1> exited abnormally with code 3

Do you thing that adding the include files will help?

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

Hi,

too bad. How about /usr/local/include (and a bit olf luck that g++ knows it) ?

Best Regards,
Jürgen


On 11/28/19 3:08 PM, Antonio Juan wrote:
Sorry for another inconvenience but since catalina I cannot write to /usr/include 


/usr 
➜ sudo mkdir include
mkdir: include: Read-only file system

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

Hi,

so the headers are usable even though they don't exist. Interesting platform
that you have there. In that situation I would (recursively) copy the header files from
/opt/X11/include to /usr/include to make sure that they are found by both the
preprocessor and the compiler. If I remember correctly then apple does not
use the real g++ but a kind of emulation of it which might cause this kind of
problems.

Also have a look at config.log after ./configure; it tells you how the tests were compiled.

Best Regards,
Jürgen


On 11/28/19 1:42 PM, Antonio Juan wrote:
Compiled well again same error, on apl interpreter

This is the new configure output

checking xcb/xcb.h usability... yes
checking xcb/xcb.h presence... no
configure: WARNING: xcb/xcb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: xcb/xcb.h: proceeding with the compiler's result
checking for xcb/xcb.h... yes
checking X11/Xlib.h usability... yes
checking X11/Xlib.h presence... no
configure: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: X11/Xlib.h: proceeding with the compiler's result
checking for X11/Xlib.h... yes
checking X11/Xlib-xcb.h usability... yes
checking X11/Xlib-xcb.h presence... no
configure: WARNING: X11/Xlib-xcb.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: X11/Xlib-xcb.h: proceeding with the compiler's result
checking for X11/Xlib-xcb.h... yes
checking X11/Xutil.h usability... yes
checking X11/Xutil.h presence... no
configure: WARNING: X11/Xutil.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: X11/Xutil.h: proceeding with the compiler's result
checking for X11/Xutil.h... yes



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

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

reply via email to

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