FreeBSD - how do I compile PolyML including XWindows module

102 Views Asked by At

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

1

There are 1 best solutions below

0
jordyTTx On

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