bugGNU nano - Bugs: bug #57702, problems with compiling on HPE...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #57702: problems with compiling on HPE NonStop platforms (nse/nsx)

Submitter:  Randall S. Becker <rsbecker>
Submitted:  Thu 30 Jan 2020 08:54:56 PM UTC
   
 
Severity:  2 - Minor Status:  Need Info
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Fri 17 Jul 2020 11:44:56 AM UTC, comment #15: 

Closing due to lack of response.

Benno Schulenberg <bens>
Group administrator
Thu 16 Jul 2020 05:31:41 PM UTC, comment #14: 

Randall?  Waiting for feedback.

(Patch updated for current git.)

(file #49492)

Benno Schulenberg <bens>
Group administrator
Mon 22 Jun 2020 08:22:56 AM UTC, comment #13: 

Ping?  Does compilation succeed when applying my version of the patch (file #49247)?

Benno Schulenberg <bens>
Group administrator
Sat 13 Jun 2020 08:36:27 AM UTC, comment #12: 

Thanks.  But... you didn't move the extra includes to the nano.h file.  Also, when spell-checking is automatic, it is quite likely that the full-seconds field of the timestamp hasn't changed, which would make nano think that the spell checker made no changes and thus skip loading the spell-checked file.  That's why the nanoseconds check was introduced.  So... I prefer to exclude the whole timestamp check and always load the spell-checked file when the nanoseconds field isn't available.  This will result in an unused variable warning when compiling for Tandem, but... that's just a warning, not an error.

Can you compile nano (both 4.7 and 4.9.x) with the attached version of your patch applied?

(file #49247)

Benno Schulenberg <bens>
Group administrator
Wed 10 Jun 2020 03:21:42 PM UTC, comment #11: 

Yes, please revise the patch.  Fully remove the two definitions of strncasecmp().  Also, put the #includes of the three header files that apparently are needed to get nano to compile on your systems into src/nano.h, inside the existing #ifdef __TANDEM, instead of changing each file as needed.  This way the patch will probably work without any changes for newer versions of nano too.

(Please skip version 4.8.  Better go directly to the 4.9.3 tarball, or to v4.9 in git.)

Benno Schulenberg <bens>
Group administrator
Tue 09 Jun 2020 02:14:45 PM UTC, comment #10: 

We were building from a tarball but as indicated, you wanted us to use git format-patch, so ...

We understand that strncasecmp is part of POSIX. I did find it on our system, but needs some defines to be enabled. I can revise the patch to fix this.

4.7 compiled fine with the posted patch, but I'm happy to make it cleaner and repost. We could not get 4.8 to compile yet, but now that I have the branch off 4.7, I can try to look at a more recent version off master - it's a matter of time more than anything.

Randall S. Becker <rsbecker>
Tue 09 Jun 2020 10:41:51 AM UTC, comment #9: 

Thanks for the patch.  However...  You add a definition of strncasecmp() to src/files.c, but src/files.c does not make use of strncasecmp(), and it never did.  In v4.7 it is src/rcfile.c that makes use of strncasecmp(), so if strncasecmp() is missing on your system, then v4.7 should have failed to compile.  If it compiled fine, then your system must have defined strncasecmp() somewhere...  Did 4.7 compile fine for you with your posted patch applied?

In current git, src/rcfile.c no longer makes use of strncasecmp(), but src/global.c now does.  But instead of defining strncasecmp() in every file where it is needed, it should be defined just once, in src/chars.c only, and its prototype added to src/proto.h.

However, strncasecmp() is part of POSIX, and has been for more than twenty years.  I don't think it is the task of nano to carry code for systems that do not provide all of the basic POSIX functions.  So... we either do this through gnulib, or you add a strncasecmp.h header file with the relevant definition to your Tandem systems.  What happens if you add "strcase" to the list of modules in autogen.sh and rerun the script?

(You mentioned v4.7, which is a tag in git. Are you building from git or from a released tarball?)

Benno Schulenberg <bens>
Group administrator
Mon 06 Apr 2020 05:19:19 PM UTC, comment #8: 

I will reopen this when you post more information.  (It is not a problem if you post the information as a new issue.)

Benno Schulenberg <bens>
Group administrator
Mon 06 Apr 2020 02:01:42 PM UTC, comment #7: 

Would like this reopened, please. We are unable to supply the requested information because access to the system where the changes were made is currently unavailable for obvious reasons. I do not have a timeframe when we will be able to bring up the data center again.

Randall S. Becker <rsbecker>
Mon 06 Apr 2020 08:43:55 AM UTC, comment #6: 

Closing, due to a lack of response.

Benno Schulenberg <bens>
Group administrator
Mon 23 Mar 2020 12:43:59 PM UTC, comment #5: 

Ping?  Any news on this?

Benno Schulenberg <bens>
Group administrator
Sun 02 Feb 2020 09:32:02 AM UTC, comment #4: 

Patches go here, please, as Attached Files, generated with 'git format-patch' and with a Signed-off-by line.  See also the last section of README.GIT.  If at all possible, please avoid changing configure.ac.

Benno Schulenberg <bens>
Group administrator
Fri 31 Jan 2020 07:55:57 PM UTC, comment #3: 

comment #2:

> Ad 5.  Gnulib has a strncasecmp() implementation.  Maybe configure.ac should probe for it, and when not found, import the relevant gnulib module?


It might be possible - not a gnulib expert, but gnulib only has a limited port on the platform.



comment #1:

> Hello Randall.  Thanks for posting.  Yes, patches are welcome, when they are small, and a few at a time.  Let's first concentrate on building from a tarball, as that is the more usual way of building and installing software.


That works for me for now.


> Ad 3.  I'm not sure that patching configure is the right way.  Probably you have other header files installed in /usr/local too and thus other packages need to look there too?  Wouldn't it then be better to make use of the CONFIG_SITE variable and make that script set CPPFLAGS?  See https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html.


Agree and will look at refining this.

> Ad 6.  What thing in files.c requires ctype.h on your platform?


That was actually because I needed to implement strncasecmp. Probably not worth keeping this comment.

> In nano.h there is a reference to NonStop kernels.  Is that fragment still relevant?


That code is still relevant and needs to be kept. I could include netdb.h and strings.h there if it makes sense, although I think a change to configure(.ac) might be more appropriate to detect whether netdb.h and strings.h are needed.

Where and it what form do you take patches? Via git or here?

Randall S. Becker <rsbecker>
Fri 31 Jan 2020 05:50:39 PM UTC, comment #2: 

Ad 5.  Gnulib has a strncasecmp() implementation.  Maybe configure.ac should probe for it, and when not found, import the relevant gnulib module?

Benno Schulenberg <bens>
Group administrator
Fri 31 Jan 2020 01:00:11 PM UTC, comment #1: 

Hello Randall.  Thanks for posting.  Yes, patches are welcome, when they are small, and a few at a time.  Let's first concentrate on building from a tarball, as that is the more usual way of building and installing software.

Ad 3.  I'm not sure that patching configure is the right way.  Probably you have other header files installed in /usr/local too and thus other packages need to look there too?  Wouldn't it then be better to make use of the CONFIG_SITE variable and make that script set CPPFLAGS?  See https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html.

Ad 6.  What thing in files.c requires ctype.h on your platform?

In nano.h there is a reference to NonStop kernels.  Is that fragment still relevant?

Benno Schulenberg <bens>
Group administrator
Thu 30 Jan 2020 08:54:56 PM UTC, original submission:  

We are trying to port nano 4.7 to NonStop. Overall things went well, but there are some issues that we needed to do to get the compile to work. Here is the list:

  1. There is no pkg-config on platform, so we cannot build from git. Tarballs only.
  2. aclocal-1.16 is not available, so running automake does not work, hence the next item.
  3. Ncurses lives in /usr/local/include/ncurses/ncurses.h, which is not normally on the include path. We had to patch configure to get it recognized. This added -I conditionally to CPPFLAGS if the platform is nsx* or nse*.
  4. strcasecmp lives in strings.h, not string.h. There is no configure detection for that.
  5. strncasecmp is not defined on platform, so we had to implement it.
  6. gethostname lives in netdb.h but that is not detected by configure.
  7. files.c did not include ctype.h
  8. SA_RESETHAND is not supported on platform, so we commented out that code.
  9. struct stat has no struct st_mtim. It only uses st_mtime, which is either long or long long depending on whether large timestamps are enabled.


I can supply the fixes for the code changes to make some of this work, if requested.

Randall S. Becker <rsbecker>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #49241:  0001-port-changes-for-the-HPE-NonStop-TNS-X-platform-nsx.patch added by rsbecker (3KiB - application/octet-stream - V2 of the port changes.)
file #49232:  0001-port-changes-for-the-HPE-NonStop-TNS-X-platform-nsx.patch added by rsbecker (4KiB - application/octet-stream - Here are the port changes for the HPE NonStop platform. The changes were made from v4.7 being the last rev we were able to easily modify at this time.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by rsbecker (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-17 bens Open/ClosedOpen Closed
    2020-07-16 bens Attached File- Added 0001-build-add-two-missing-includes-for-the-HPE-NonStop-T.patch, #49492
    2020-06-13 bens Attached File- Added 0001-build-add-two-missing-includes-for-the-HPE-NonStop-T.patch, #49247
    2020-06-11 rsbecker Attached File- Added 0001-port-changes-for-the-HPE-NonStop-TNS-X-platform-nsx.patch, #49241
    2020-06-10 bens Assigned toNone bens
    2020-06-09 bens Open/ClosedClosed Open
    2020-06-08 rsbecker Attached File- Added 0001-port-changes-for-the-HPE-NonStop-TNS-X-platform-nsx.patch, #49232
    2020-04-06 bens Severity3 - Normal 2 - Minor
    2020-04-06 bens Open/ClosedOpen Closed
    2020-03-25 bens StatusNone Need Info
    2020-02-02 bens SummaryNano 4.7 - Problems compiling on HPE NonStop platforms (nse/nsx) problems with compiling on HPE NonStop platforms (nse/nsx)

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code