public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Libffi on Tru64?
@ 2021-07-04 22:54 Jay K
  2021-07-05 11:42 ` Jay K
  0 siblings, 1 reply; 4+ messages in thread
From: Jay K @ 2021-07-04 22:54 UTC (permalink / raw)
  To: libffi-discuss; +Cc: Larkin Nickle

Hi. I've built "a lot" of "GNU" software quite recently for Tru64 / OSF/1.
Mostly current but not all.
gcc (3.4.6, 4.7.4) gdb (6.4) sed m4 autoconf make tar gettext tcl diff gawk bzip2 grep etc.

libffi is giving me a bit more pause now.

When I tried with native cc, I saw the following problems:

inline asm
It appears native cc does have a reasonable inline asm feature.
 Basically each instruction is modeled as a function, taking params in a0, a1, etc., 
 and returning in v0, but compiler can rename. There is an intrinsic
 for each return type.

I can likely make easy patches, under #if __GNU__

pointer math on void*.
 I suggest cast to char* first.
 I can provide patches for that later too.

But anyway I tried with gcc instead.
There I also have problems.
In 2014 osf.S got ".macro". This seems to be not a thing with native as. It errors.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi-3.3 -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi-3.3/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
 as0: Error: /usr/users/jay/s/libffi-3.3/src/alpha/osf.S, line 37: undefined assembler operation: .macro

GNU as is not supported. Perhaps we should fix that.

So I went back to before the 2014 commit that added .macro.
I installed autoconf, automake.
That fails with:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
/usr/users/jay/s/libffi/src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"

I'll look more later. Perhaps it was an obvious brief breakage..

Thank you for any tips.
 - Jay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Libffi on Tru64?
  2021-07-04 22:54 Libffi on Tru64? Jay K
@ 2021-07-05 11:42 ` Jay K
  0 siblings, 0 replies; 4+ messages in thread
From: Jay K @ 2021-07-05 11:42 UTC (permalink / raw)
  To: libffi-discuss; +Cc: Larkin Nickle

> I'll look more later. Perhaps it was an obvious brief breakage..

Building from before complex support succeeds, i.e. building from here:

commit fb25cd08ed5a87640b02f0feeb10a09b37cfddbe (HEAD -> master)
Author: Ehsan Akhgari <ehsan@mozilla.com>
Date:   Wed Jun 11 12:07:24 2014 -0400

    Add support for building with clang-cl

Likely .macro can be replaced with #define, as this assembler by default uses the C preprocessor (not sure about multi-line output..)

 - Jay

________________________________
From: Jay K
Sent: Sunday, July 4, 2021 10:54 PM
To: libffi-discuss@sourceware.org <libffi-discuss@sourceware.org>
Cc: Larkin Nickle <me@larbob.org>
Subject: Libffi on Tru64?

Hi. I've built "a lot" of "GNU" software quite recently for Tru64 / OSF/1.
Mostly current but not all.
gcc (3.4.6, 4.7.4) gdb (6.4) sed m4 autoconf make tar gettext tcl diff gawk bzip2 grep etc.

libffi is giving me a bit more pause now.

When I tried with native cc, I saw the following problems:

inline asm
It appears native cc does have a reasonable inline asm feature.
 Basically each instruction is modeled as a function, taking params in a0, a1, etc.,
 and returning in v0, but compiler can rename. There is an intrinsic
 for each return type.

I can likely make easy patches, under #if __GNU__

pointer math on void*.
 I suggest cast to char* first.
 I can provide patches for that later too.

But anyway I tried with gcc instead.
There I also have problems.
In 2014 osf.S got ".macro". This seems to be not a thing with native as. It errors.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi-3.3 -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi-3.3/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
 as0: Error: /usr/users/jay/s/libffi-3.3/src/alpha/osf.S, line 37: undefined assembler operation: .macro

GNU as is not supported. Perhaps we should fix that.

So I went back to before the 2014 commit that added .macro.
I installed autoconf, automake.
That fails with:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
/usr/users/jay/s/libffi/src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"

I'll look more later. Perhaps it was an obvious brief breakage..

Thank you for any tips.
 - Jay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Libffi on Tru64?
  2024-02-15 12:43 Mark Butt
@ 2024-02-18  7:54 ` Jay K
  0 siblings, 0 replies; 4+ messages in thread
From: Jay K @ 2024-02-18  7:54 UTC (permalink / raw)
  To: Mark Butt; +Cc: libffi-discuss, me

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

Mark, I don't remember, but I think so maybe?
"me" should have some record..and I can try to look.
Sorry for the lack of information so far.

I know I had Python 2.x working, enough to run my build scripts.
I still haven't managed to port to Python 3.

The larger goal of modern gcc definitely didn't work out. 🙁
You can build old gcc, from native cc.
cmake was challenging.
Lots of stuff worked reasonably though. autoconf/automake really shown well imho.
git worked. Many things worked. Modula-3 worked. 🙂

These old systems are kinda fun. 🙂
I just wish they were a little easier to setup, and CI was run for the various projects.
I guess we should run Linux on these systems, NT, VMS, FreeBSD, etc. 🙂


  *   Jay

________________________________
From: Mark Butt <mark@markwbutt.com>
Sent: Thursday, February 15, 2024 4:43 AM
To: jayk123@hotmail.com <jayk123@hotmail.com>
Cc: libffi-discuss@sourceware.org <libffi-discuss@sourceware.org>; me@larbob.org <me@larbob.org>
Subject: Re: Libffi on Tru64?


Hello Jay,

I was wondering if you ever managed to figure out the error when trying to build libffi with gcc on Tru64.
#error "osf.S out of sync with ffi.h”

I currently have libffi-3.1 installed.  I am trying to build Python 2.7.18 but many modules are failing to build and I am wondering if it might be because my libffi is too old… hence wanting to try a newer version.

Thanks!
-M
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Libffi on Tru64?
@ 2024-02-15 12:43 Mark Butt
  2024-02-18  7:54 ` Jay K
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Butt @ 2024-02-15 12:43 UTC (permalink / raw)
  To: jayk123; +Cc: libffi-discuss, me


Hello Jay,

I was wondering if you ever managed to figure out the error when trying to build libffi with gcc on Tru64.
#error "osf.S out of sync with ffi.h”

I currently have libffi-3.1 installed.  I am trying to build Python 2.7.18 but many modules are failing to build and I am wondering if it might be because my libffi is too old… hence wanting to try a newer version. 

Thanks!
-M
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-18  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04 22:54 Libffi on Tru64? Jay K
2021-07-05 11:42 ` Jay K
2024-02-15 12:43 Mark Butt
2024-02-18  7:54 ` Jay K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).