Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS400 port of curl requires deprecated IBM library #5176

Closed
NattyNarwhal opened this issue Apr 2, 2020 · 8 comments
Closed

OS400 port of curl requires deprecated IBM library #5176

NattyNarwhal opened this issue Apr 2, 2020 · 8 comments

Comments

@NattyNarwhal
Copy link
Contributor

NattyNarwhal commented Apr 2, 2020

I had previously mentioned this in the pull request I did to fix the CCSID converter, but I realized I should have made a seperate issue for bringing attention to this. curl requires QADRT to build, which provides ASCII wrappers for libc/POSIX functions in the ILE, but IBM no longer supports or even offers this library to download. It would be wise to migrate curl to using LOCALETYPE(*LOCALEUTF) available with modern ILE, which provides similar wrappers and UTF-8 string constants without having to swaddle a temporary file in #pragma convert.

cc @monnerat @jonrumsey who did ILE port

curl/libcurl version

libcurl version 7.70.0-DEV                                                  
Mar 23 2020                                                                 
21:40:06                                                                    
Copyright (C) 1998-2016 Daniel Stenberg et al. OS/400 version by P. Monnerat

operating system

IBM i 7.2

@monnerat
Copy link
Contributor

monnerat commented Apr 3, 2020

Thanks for the information.
As I already mentioned in several comments, since 2016 I do not have access anymore to an iSeries system and thus, can only apply blindly tiny maintenance changes to the OS400 version, with the help of Jon for testing and completing what I missed.
I ported libcurl to OS400 using QADRT because this was the only ascii-compatible support at this time (13 years ago!). As this library was incomplete, there are additional wrappers in packages/OS400/os400sys.[ch].
Dropping QADRT would probably require changes to lib/config-os400.h, lib/setup-os400.h, packages/OS400/os400.sys.[ch], packages/OS400/make*, packages/OS400/initscript.sh and of course, packages/OS400/README.OS400.
In short, this is almost a port to a completely new system.
IMHO, there are 2 alternatives to get rid of QADRT:

  • Use the new ILE features you mention, or
  • Write the needed wrappers that QADRT provided until now.

Unfortunately, both are not tiny maintenance tasks and I cannot afford them unless someone can provide me access to an iSeries computer. The OS400 version thus needs finding a new maintainer who can start by doing this conversion. Maybe you ?

@jonrumsey
Copy link
Contributor

jonrumsey commented Apr 6, 2020

As of OS/400 V5R2M0 the ASCII runtime has been shipped as part of the operating system (check QSYS for *SRVPGMs prefixed QADRT), so is continuing with QADRT a question of access to the correct set of header files at build time? I'm not sure switching the LOCALETYPE on CRTCMOD to UTF-8 will have the same effect as the existing pragma convert on string literals.

@NattyNarwhal
Copy link
Contributor Author

NattyNarwhal commented Apr 6, 2020

I verified with a clean system on 7.2; the service programs are there, but the include files are not (or at least, installed somewhere known, I did a check in /QIBM in case), so it won't build.

@monnerat I know people with machines; I can get you access to one. Email me and I can see what I can do.

@bobcozzi
Copy link

bobcozzi commented Apr 6, 2020

I heard IBM was working on a curl-like native tool but who knows... I think moving it to UTF support would be the right path to take. Let me know if you need access to an IBM i system with v7r3 running.

@monnerat
Copy link
Contributor

monnerat commented Apr 7, 2020

I heard IBM was working on a curl-like native tool but who knows...

Curl support on OS400 is only lthe API library (libcurl) and features an ILE RPG binding: I investigated long ago for a port of the cli tool, but it has far too many options for a *CMD: I resigned.

It seems strange to me that IBM dropped the QADRT header files completely: they always had a particular care of backward support compatibility. I.e.: why keeping the service program if programs using it cannot be recompiled anymore? There should probably be an optional extension for the header files, like the old ascii PRPQ.

@NattyNarwhal & @bobcozzi : many thanks for your machine access proposal. Since I'm not in the IBM i business anymore (currently unemployed), I would really prefer someone active in it does this new port (note the same problem will arise with libssh2 and libxml2). I'll provide any help I can for this new project. Let's keep the proposal as an extreme alternative solution.

@ThePrez
Copy link

ThePrez commented Apr 9, 2020

@monnerat, for reference only, there are also the Axis client APIs for RPG, for SOAP/REST, at least.
It's not nearly as robust as a libcurl, but if people just need REST, it's a good option

@ThePrez
Copy link

ThePrez commented Apr 9, 2020

IBM is working to resurrect the web presence around QADRT. In the meantime, one can download it from here.

@cobol400
Copy link

cobol400 commented Sep 28, 2020

IBM is working to resurrect the web presence around QADRT. In the meantime, one can download it from here.

In the meantime the page "ASCII Runtime for IBM i" is available at URL: https://www.ibm.com/support/pages/node/6258183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants