ericmandel / xpa Goto Github PK
View Code? Open in Web Editor NEWseamless communication between many kinds of Unix programs, including X programs and Tcl/Tk programs.
License: Other
seamless communication between many kinds of Unix programs, including X programs and Tcl/Tk programs.
License: Other
Following these instructions it's possible to make the release more appealing and to add some info about.
I've done for the v1.8 pyds9 release and it looks much nicer that a simple tag number ๐
Hi,
the latest version is tagged as 2.1.6; the previous one (that was on http://hea-www.harvard.edu/saord/download/xpa/) was however 2.1.15.
Maybe this is a spelling errror and should be 2.1.16 instead of 2.1.6?
When compiling with glibc 2.27 and gcc 7.4.0 I got the following warnings (I'm showing the full compile output just to show they are the only warnings :-)
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H xpa.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H xpaio.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H command.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H acl.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H remote.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H clipboard.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H port.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H tcp.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H client.c
client.c: In function 'XPAClientGet':
client.c:1064:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(client->fd, tbuf, strlen(tbuf));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client.c:1066:7: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(client->fd, *(client->bufptr), *(client->lenptr));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client.c:1070:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(client->fd, tbuf, strlen(tbuf));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client.c:1099:7: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(client->fd, *(client->bufptr), *(client->lenptr));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client.c: In function 'XPAClientLoopFork':
client.c:1535:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(fd[1], &active, 1);
^~~~~~~~~~~~~~~~~~~~~~~~
client.c:1555:5: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
read(fd[0], &active, 1);
^~~~~~~~~~~~~~~~~~~~~~~
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H word.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H xalloc.c
xalloc.c: In function '_xalloc_error':
xalloc.c:43:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(1, XALLOC_ERROR, strlen(XALLOC_ERROR));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H find.c
find.c: In function 'ResolvePath':
find.c:191:5: warning: ignoring return value of 'getcwd', declared with attribute warn_unused_result [-Wunused-result]
getcwd(path, MAXBUFSIZE);
^~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H xlaunch.c
xlaunch.c: In function 'launch_fork_exec':
xlaunch.c:223:8: warning: ignoring return value of 'dup', declared with attribute warn_unused_result [-Wunused-result]
dup(1);
^~~~~~
xlaunch.c:282:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(fd[1], &status, 4);
^~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H timedconn.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H tclloop.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H tcl.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H xtloop.c
gcc -c -I. -g -O2 -D_REENTRANT -fPIC -DHAVE_CONFIG_H gtkloop.c
It seems that the POSIX.1-2001 standard requires a different/additional header file <sys/select.h>
to be included to provide the fd_set
type. See for example here and here. The error when compiling with strict standard settings is
xpa-master/xpa.h:403:33: error: unknown type name 'fd_set'
int XPAAddSelect _PRx((XPA xpa, fd_set *readfdsptr));
^
xpa-master/prsetup.h:27:17: note: expanded from macro '_PRx'
#define _PRx(s) s
^
In order to use XPA on a Linux system in a --std=c99
code, I had to use the following:
#define _XOPEN_SOURCE 600
#include <sys/select.h>
#include "xpa.h"
under OPTIONS, just after the documentation for -del, there's an example:
cat foo.fits | xpaset xpamb -store foo -info "FITS" "DS9:*" fits foo.fits
That should be
cat foo.fits | xpaset xpamb -data foo -info "FITS" "DS9:*" fits foo.fits
hey @ericmandel, the configure files on the 2.1.19 tag and master still have the version listed as 2.1.18.
Hello, when compiling xpa with TCL support in a Fedora >= 27 system, I get the following error
tcl.c: In function 'XPARec_Tcl':
tcl.c:974:58: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'?
if( !(chan = Tcl_MakeTcpClientChannel((ClientData)(uintptr_t)xpa_cmdfd(xpa))) ){
^~~~~~~~~
intptr_t
The compilation worked in Fedora 26.
The problem appears when compiling in the Fedora build system, that is, where the RPMS for Fedora are created. The CFLAGS hare are set to
CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables'
If I patch tcl.c to include <stdint.h>, the error goes away, but I don't know if this will work generally or only for Fedoras
Currently the shared library build ignores LDFLAGS. This patch will fix it
--- a/Makefile.in
+++ b/Makefile.in
@@ -182,7 +182,7 @@
rm -f lib$(PACKAGE).tmp/xt*.o; \
rm -f lib$(PACKAGE).tmp/tcl*.o; \
CC='$(CC)' CXX=$(CXX) \
- ./mklib -o $(PACKAGE) lib$(PACKAGE).tmp/*.o; \
+ ./mklib -ldflags "$(LDFLAGS)" -o $(PACKAGE) lib$(PACKAGE).tmp/*.o; \
rm -rf lib$(PACKAGE).tmp)
mingw-dll: $(LIBOBJS)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.