Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18187 closed defect (fixed)

ncursesw and ncurses universal builds are incorrect

Reported by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) Owned by: imajes@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: ncursesw ncurses universal Cc: ryandesign (Ryan Schmidt), anthony.c.smith@…
Port: ncursesw ncurses

Description (last modified by ryandesign (Ryan Schmidt))

Attached are proposed changes to the universal builds of ncursesw and ncurses
using the PortGroup muniversal.

After building, there are extra pre-processor commands (__LP64__, __i386__, etc)
in the headers which would not be there using the default universal build
mechanism.

Attachments (2)

patch-ncurses.diff (1.0 KB) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 12 years ago.
patch-ncursesw.diff (815 bytes) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 12 years ago.

Download all attachments as: .zip

Change History (20)

Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: patch-ncurses.diff added

Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: patch-ncursesw.diff added

comment:1 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

Fixed in r46484 (maintainer timeout).

comment:2 Changed 12 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Resolution: fixed
Status: closedreopened

This change causes it to no longer be possible to create an i386/ppc universal build.

comment:3 Changed 12 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

At least on a PowerPC Mac. (You end up with just a ppc build.)

On an Intel Mac, it also prevents the creation of an i386/ppc/x86_64/ppc64 universal build. (You end up with just an i386/x86_64 build.)

comment:4 in reply to:  3 ; Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to ryandesign@…:

At least on a PowerPC Mac. (You end up with just a ppc build.)

On an Intel Mac, it also prevents the creation of an i386/ppc/x86_64/ppc64 universal build. (You end up with just an i386/x86_64 build.)

This is intentional.
The configure script must run binaries to work correctly (hence "set merger_must_run_binaries yes").
The muniversal PortGroup often has difficulty merging three architectures as it does with ncurses and ncursesw (hence "set merger_no_3_archs yes").

In the Intel case, if the user has universal_archs set to "ppc i386 ppc64 x86_64," then the ppc64 can definitely not be built and the PortGroup must choose
two architectures from the remaining valid three.
It chooses i386 and x86_64.

What was the value of universal_archs on the PowerPC build?
The PortGroup would have removed the i386 and x86_64 architectures.

The two ports used to build using -arch, but, as can be seen in the header files, the build were incorrect.
I figured it was better to build correctly on fewer architectures than incorrectly on all architectures.

comment:5 in reply to:  2 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to ryandesign@…:

This change causes it to no longer be possible to create an i386/ppc universal build.

It is still possible on an Intel Mac with universal_archs set to just i386 and ppc.

comment:6 in reply to:  4 ; Changed 12 years ago by ryandesign (Ryan Schmidt)

Replying to mcalhoun@…:

What was the value of universal_archs on the PowerPC build?

The default, i386 ppc.

The PortGroup would have removed the i386 and x86_64 architectures.

Yes, it did.

The two ports used to build using -arch, but, as can be seen in the header files, the build were incorrect.
I figured it was better to build correctly on fewer architectures than incorrectly on all architectures.

But it is better still to build correctly for all four architectures. :) Not doing so limits the 130 ports that depend on ncurses and ncursesw to a similar fate.

comment:7 in reply to:  6 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to ryandesign@…:

Replying to mcalhoun@…:

What was the value of universal_archs on the PowerPC build?

The default, i386 ppc.

The PortGroup would have removed the i386 and x86_64 architectures.

Yes, it did.

So it seems that at least the PortGroup is behaving as intended (cold comfort for some).

The two ports used to build using -arch, but, as can be seen in the header files, the build were incorrect.
I figured it was better to build correctly on fewer architectures than incorrectly on all architectures.

But it is better still to build correctly for all four architectures. :)

Touche.
Any ideas on how to accomplish such a thing?

Personally, I would not object to allowing Intel/PowerPC universal to fade away.
The concept has always had a difficult time fitting in with the MacPorts model of "download, compile, and run."

I do not think the maintainer of these ports has weighed in on this issue.

comment:8 Changed 12 years ago by cerieljacobs@…

Cc: cerieljacobs@… added

Cc Me!

comment:9 Changed 12 years ago by cerieljacobs@…

port install ncurses +universal (universal=x86_64) hangs on executing run_tic.sh:

mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/work/destroot-x86_64/opt/local/share/tabset DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/work/destroot-x86_64 \

prefix=/opt/local \ exec_prefix=/opt/local \ bindir=/opt/local/bin \ top_srcdir=.. \ srcdir=. \ datadir=/opt/local/share \ ticdir=/opt/local/share/terminfo \ source=terminfo.tmp \ THIS_CC="/usr/bin/gcc-4.0 -m64" \ THAT_CC="/usr/bin/gcc-4.0 -m64" \ /bin/sh ./run_tic.sh

Building terminfo database, please wait... Running tic to install /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/work/destroot-x86_64/opt/local/share/terminfo ...

You may see messages regarding extended capabilities, e.g., AX. These are extended terminal capabilities which are compiled using

tic -x

If you have ncurses 4.2 applications, you should read the INSTALL document, and install the terminfo without the -x option.

C

comment:10 in reply to:  9 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to cerieljacobs@…:

port install ncurses +universal (universal=x86_64) hangs on executing run_tic.sh:

It turns out that portconfigure.tcl sets --host and --target if there is only one universal architecture.
This causes ncursesw to install i686-apple-darwin9-tic (on my machine) instead of tic.
r46928 should fix this behavior.

You will have to rebuild ncursesw with the universal option.
Just to be safe, you might want to rebuild any ports which have been build with just one universal architecture and use the muniversal PortGroup.

Please let me know if this fixes the problem.

comment:11 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Are there any ideas about how to create a i386/ppc/x86_64/ppc64 universal build?
If not, can this ticket be closed (assuming the previous problem is fixed)?

comment:12 Changed 12 years ago by cerieljacobs@…

I am using MacPorts from binary distribution. Tomorrow I will install MacPorts from SVN and try to see if this fixes the problem. Thanks for your fast response.

comment:13 Changed 12 years ago by cerieljacobs@…

Checked out revision 46976, and that fixes the problem. $ port install ncurses +universal executes without problems.

comment:14 Changed 12 years ago by cerieljacobs@…

Cc: cerieljacobs@… removed

Cc Me!

comment:15 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: reopenedclosed

r47312 should now allow 4-way universal build.

r47312 has only been tested on an Intel/Leopard machine.
Please reopen if the change fails to work on a different system.

comment:16 in reply to:  15 Changed 12 years ago by anthony.c.smith@…

Replying to mcalhoun@…:

r47312 should now allow 4-way universal build.

r47312 has only been tested on an Intel/Leopard machine.
Please reopen if the change fails to work on a different system.

Still stalling on ppc64 destbuild...

You may see messages regarding extended capabilities, e.g., AX. These are extended terminal capabilities which are compiled using

tic -x

If you have ncurses 4.2 applications, you should read the INSTALL document, and install the terminfo without the -x option.

...when building under Intel (Core 2 Duo)/Leopard as a 4-way universal build.

Built MacPorts from r47390.

sudo port -v install ncursesw +universal

comment:17 Changed 12 years ago by anthony.c.smith@…

Cc: anthony.c.smith@… added

Cc Me!

comment:18 Changed 12 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.