This is not an exhaustive list but should help:
1. The version of g++ on the Linux we build on (1.2.13) does not find its own include files by default. Before building define the include path with
export CPLUS_INCLUDE_PATH=/usr/include/g++-include
2. Some files need shuffling in the pgplot distribution to build correctly with gcc and Linux requires a reduced drivers file (most of the others don't build)
( cd pgplot/sys_linux; ln -s f77_gcc.conf f77_cc.conf ) ( cd pgplot; mv linux_drivers.list drivers.list )
3. It may also be necessary to edit "src/Makefile" and remove the flag -extend_source from the $(F77) rule
4. After the first build attempt, cd library and do make -i (f77 return status of 4 stops a correct build)
5. cd src and touch lexcommands.c. To ensure that flex doesn't overwrite this with unworking code.
6. go into pgplot and edit the makefile to remove -f2c from the begining of the "LIBS=" line. Re-make to build the pgxwin_server properly
7. Now try "make all" again, it should run through this time.