0

On freebsd 12 the xwindows module in PolyML is not implemented so I am trying to compile its source outside the ports tree. It does compile, but I cannot open the XWindows module in poly.

What I did is:

  • copied libX11 to /usr/lib to be sure, and made symbolic links in /usr/include for Xm and X11 to /usr/local/include.

  • inserted one space in xwindows.cpp because of a clang error

  • added these options to configure : --x-includes=/usr/local/include/X11 --x-libraries=/usr/local/lib/ --with-x --with-system-libffi

  • set the environment : LDFLAGS=-L/usr/local/lib/gcc7 , where libstdc++ is located

  • tried with clang and gcc7

The code compiles without further errors. There is a file xwindows.o, 375160 bytes for cc and 291184 for gcc7. The log contains Created structure XWindows Created structure Motif

I run poly from where it was compiled, and get open XWindows poly: : error: Structure (XWindows) has not been declared Found near open XWindows.

The non-graphics modules open normally

What am i doing wrong here ?? thanks for pointers

Rob
  • 14,746
  • 28
  • 47
  • 65
jordyTTx
  • 13
  • 3
  • There is already `lang/polyml` port: https://www.freshports.org/lang/polyml/ Doesn't it suit for you? – arrowd Mar 20 '20 at 07:43
  • @arrowd That is the one I used, but XWindows is disabled in it – jordyTTx Mar 23 '20 at 18:29
  • It seems that `MOTIF` option does exactly what you want. But you'll need to compile this software from ports by running `make -C /usr/ports/lang/polyml config install clean`. – arrowd Mar 24 '20 at 08:03
  • @arrowd The MOTIF option is set in the port, vd `Makefile:OPTIONS_DEFINE= MOTIF` `MOTIF_CONFIGURE_WITH= x` `MOTIF_USE= motif` after compilation however, 'strings xwindows.o' shows `Not implemented` `xwindows.cpp` `PolyXWindowsGeneral` zPLR – jordyTTx Mar 24 '20 at 15:57
  • `OPTIONS_DEFINE` only declares an option. You should enable it in `make config` dialog and then compile a port. Have you done this? – arrowd Mar 25 '20 at 06:31
  • @arrowd Thanks, I indeed had omitted a `make rmconfig` . After this, I could compile from the port directory, and I made two changes to get my result – jordyTTx Mar 25 '20 at 16:40

1 Answers1

0

I

  1. added CONFIGURE_ENV= LDFLAGS=-L/usr/local/lib to the port's Makefile, and
  2. inserted a space before ZERO_X in xwindows.cpp

after which the ports code compiled, including the 2 modules in poly

My error has been to omit a make rmconfig before new compilation, and I had originally compiled poly without motif, so that kept coming back

jordyTTx
  • 13
  • 3