Wednesday, April 21, 2021

TOPSPIN 3.6.3 ON FEDORA 32 - AU COMPILATION

This has been a constant recalcitrant, notwithstanding a far more robust way Bruker is packaging the Topspin processing software nowadays, to play with modern Linux distros.  

For those of us who want to run latest distro versions and still use Topspin, a few tidbits like the following will still prove helpful.


AU Compilation Fails ! 


  The in-built gcc that is supplied with Topspin 3.6.3 fails to compile even the library AU programs. You might see an error message such as the following.

 

You might encounter this in any of the following ways you want to source/compile the AU programs : 

  • via the edau dialog suite
  • by running cplbruk <AU name>  on Topspin command line
  • simply trying to run a <au name> from Topspin command line

Remedy : 

  • Go to <TSHOME>/exp/stan/nmr/au/ directory. 
  • Do a 'export XWINNMRHOME=<your Topspin install location>'
  • Use the makeau script directly from here to compile the AU sources you need using the native gcc switch :  makeau --native <program name>
 
I used a simple shell script like below to compile all the existing library AU source files : 

(Note: the 'user' subdirectory inside 'src' will generate an error for the above code since it  is not an au program.)


You can run the above script with 'src/user' to compile the user AU programs.


Thoughts :

This is not an ideal solution obviously, since anytime a user generates AU code, it has to be compiled by hand from the shell. But, unfortunately, this is the only workaround available currently, as long as Bruker's Topspin in-built commands such as 'cplbruk'  do not use the correct gcc version to do the job.


UPDATE - PLEASE READ ! :  

I found that there is a much more elegant solution to this problem that can be simply addressed.   The 'makeau' script itself has an internal mechanism to resort to the --native switch so that the Distro's compilation suite can be used.    

In the code snippet from 'makeau' shown below,  you can uncomment the entry
 
my $opt_native = 1;  

line.   Although the comments point this to be a workaround for Windows systems, even for the Fedora 32 system, it worked fine. 

Once I uncommented that line,  I am able to run 'cplbruk <script>'  as well as explicit compilation from the edau dialog and menu window.   I am also able to run 'expinstall' and compile all user AU programs.   This seems to be a more enduring way to solve this problem.

No comments:

Post a Comment