Welcome to iraf.net Tuesday, November 21 2017 @ 06:28 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 xgterm on Debian amd64 Stretch
   
daisuke
 08/18/2017 04:14AM (Read 707 times)  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
I have recently installed Debian 9 Stretch amd64 on my computer.
As usual, I have compiled xgterm included in x11iraf using following my own patch.

http://s3b.astro.ncu.edu.tw/~daisuke/tmp/xgterm_patch_20170818

The procedure is as follows.

% cd /tmp
% mkdir x11iraf
% cd x11iraf
% tar xzvf /tmp/x11iraf-v2.0BETA-src.tar.gz
% patch -p 1 < /tmp/xgterm_patch_20170818
% xmkmf -a
% make

I could not make the executable for ximtool, but the dynamically linked 64-bit executable file for xgterm was successfully generated.
But, when I execute xgterm, a segmentation fault happens.

Until Debian 8 Jessie, I could make dynamically linked 64-bit executable of xgterm, and there was not problem to use it.
Does anyone know why?

On 32-bit system Debian 9 Stretch i386, I can successfully make the 32-bit executable of xgterm and can run the program without any problem, of course.

 
Profile Email
 Quote
fitz
 08/18/2017 04:20AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 3988
The X11IRAF tools have not been ported to 64-bit and there are no plans to do so due to the effort involved. I'm surprised to hear that a 64-bit xgterm even compiled let along actually worked.

 
Profile Email
 Quote
daisuke
 08/18/2017 04:26AM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
Just for your information, I have been using 64-bit xgterm for many years already, and so far I do not find any problem.
The Debian system I use is 64-bit amd64 port running as a domain-u os on Xen hypervisor.

 
Profile Email
 Quote
daisuke
 08/18/2017 06:11AM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
Things I have found.

1. I re-installed Debian 9 Stretch amd64 from the scratch. Then, I copied the 64-bit executable file of xgterm generated on Debian 8 Jessie amd64 into Debian 9 system. I executed xgterm, and I could successfully run xgterm. I started to suspect the C compiler installed on Debian 9 Stretch amd64.

2. I checked versions of GCC installed on Debian 9 and 8. On Debian 9, it is GCC 6.3, and on Debian 8, it is GCC 4.9.2. I guess GCC 6.3 is still buggy.

3. Instead of GCC 6.3, I tried clang 3.5 to compile xgterm on Debian 9 Stretch amd64, and the executable file was successfully generated, and it was successfully executed.

In summary, we should use clang instead of gcc on Debian 9 to make 64-bit xgterm executable file.

 
Profile Email
 Quote
daisuke
 08/18/2017 06:48AM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
Oops, I now find that I have worked on Debian 8 using clang.
On Debian9 with clang, it still fails.

 
Profile Email
 Quote
olebole
 08/18/2017 07:17AM  
++++-
Regular Member

Status: offline


Registered: 05/01/2014
Posts: 82
Since I also had a look into a possible 64-bit version for Debian (and failed): could I ask you to upload the build log (just the output to the compile commands), and the executables somewhere? And also the build logs for the attemts that fail?

I would be surprised if you got some working 64-bit code. It is just not 64-bit clean, and the small patch does not fix that.

 
Profile Email Website
 Quote
daisuke
 08/18/2017 12:48PM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
Are these useful for you?

build log on Debian Jessie
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/make_debian_jessie.log
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/xmkmf_debian_jessie.log

build log on Ubuntu 14
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/make_ubuntu_14.log
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/xmkmf_ubuntu_14.log

64-bit executable generated on Debian Jessie
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/xgterm.debian_amd64_jessie

64-bit executable generated on Ubuntu 14
http://s3b.astro.ncu.edu.tw/~daisuke/xgterm/xgterm.ubuntu_amd64_14

 
Profile Email
 Quote
daisuke
 08/18/2017 12:56PM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
Even for the failure case on Debian Stretch, the compilation by gcc is successfully done and the executable is made.
But, when executed, it causes a segmentation fault.

In the file /var/log/messages, I find following statement.

xgterm[21209]: segfault at fffffffff384e2c0 ip 00007fcdf3544367 sp 00007fff4f3d4178 error 5 in libc-2.24.so[7fcdf34b0000+195000]

It seems that with libc-2.19 on Debian 8 and Ubuntu 14, it works.
But, it does not work with libc-2.24 on Debian 9.

 
Profile Email
 Quote
olebole
 08/18/2017 01:44PM  
++++-
Regular Member

Status: offline


Registered: 05/01/2014
Posts: 82
I must say that I am surprised. I could now also build from the unpatched source on Debian Jessie, and at least start the executable.

@fitz: what is the smoke test for x11iraf?

Build on Debian testing fails (at least) due to the deprecated use of stdarg in the (patched?) Tcl 7.3 sources. You may want to search how to compile tcl-7.3 with modern compilers (or how to migrate to a more modern version).

 
Profile Email Website
 Quote
daisuke
 08/18/2017 01:56PM  
+----
Newbie

Status: offline


Registered: 08/18/2017
Posts: 7
I actually have been making 64-bit binary of xgterm for years when I install new version of operating systems.
And, I thought everyone is doing something similar, because a relatively small number of changes can make the executable.

It may be a huge work to port the whole x11iraf into 64-bit system, but it may not be extremely difficult work if we focus only on xgterm.

 
Profile Email
 Quote
olebole
 09/05/2017 06:48AM  
++++-
Regular Member

Status: offline


Registered: 05/01/2014
Posts: 82
If you have useful patches for xgterm; could you create a pull request on github?

https://github.com/iraf/iraf-v216/pulls

Although I would find it better to have X11iraf (resp. xgterm) in a separate repository, it already may be useful to have your patches saved and already discussed.

Best regards

Ole

 
Profile Email Website
 Quote
   
Content generated in: 0.12 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login