Opened 10 years ago

Closed 10 years ago

#45772 closed defect (worksforme)

rxvt-unicode @9.20 fails to build

Reported by: harciga Owned by: evangoldenberg@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: rxvt-unicode

Description

Undefined symbols for architecture i386

Attachments (1)

main.log (74.7 KB) - added by harciga 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by harciga

Attachment: main.log added

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; evangoldenberg@… removed
Owner: changed from macports-tickets@… to evangoldenberg@…

The build fails because although you've requested an x86_64-only build, it's trying to compile some objects universal, for both x86_64 and i386, and trying to link them with the other objects that weren't built universal.

This appears to be happening because it's trying to use your OS X version of perl, which suffers from a problem that we already fixed in the MacPorts versions of perl some years ago (#24779). Your OS X version of perl is universal, and the -arch flags that Apple used to build perl are bleeding into the rxvt-unicode build.

The solution is to make sure rxvt-unicode's build always uses MacPorts perl, never OS X's perl. The portfile already specifies that it should be using ${prefix}/bin/perl. If you have the perl5 port installed, that should be a symlink to a MacPorts version of perl. Is it possible that you instead have /opt/local/bin/perl as a symlink to the system version of perl?

rxvt-unicode should probably switch to using an explicit version of MacPorts perl. At this time we are still recommending that perl5.16 be used for that.

comment:2 in reply to:  1 Changed 10 years ago by harciga

Replying to ryandesign@…:

The build fails because although you've requested an x86_64-only build, it's trying to compile some objects universal, for both x86_64 and i386, and trying to link them with the other objects that weren't built universal.

This appears to be happening because it's trying to use your OS X version of perl, which suffers from a problem that we already fixed in the MacPorts versions of perl some years ago (#24779). Your OS X version of perl is universal, and the -arch flags that Apple used to build perl are bleeding into the rxvt-unicode build.

The solution is to make sure rxvt-unicode's build always uses MacPorts perl, never OS X's perl. The portfile already specifies that it should be using ${prefix}/bin/perl. If you have the perl5 port installed, that should be a symlink to a MacPorts version of perl. Is it possible that you instead have /opt/local/bin/perl as a symlink to the system version of perl?

rxvt-unicode should probably switch to using an explicit version of MacPorts perl. At this time we are still recommending that perl5.16 be used for that.

Indeed my {$prefix}/bin/perl is linking to OS X's perl

This is with sudo port select perl perl5.12-apple.12

lrwxr-xr-x  1 root  admin      8 Aug 11  2013 /opt/local/bin/perl5@ -> perl5.12
-rwxr-xr-x  2 root  admin  45815 Apr 24  2014 /opt/local/bin/perlthanks-5.12*
-rwxr-xr-x  1 root  admin  12484 Apr 24  2014 /opt/local/bin/perlivp-5.12*
-rwxr-xr-x  1 root  admin    244 Apr 24  2014 /opt/local/bin/perldoc-5.12*
-rwxr-xr-x  2 root  admin  45815 Apr 24  2014 /opt/local/bin/perlbug-5.12*
lrwxr-xr-x  1 root  admin      8 Apr 24  2014 /opt/local/bin/perl5.12.5@ -> perl5.12
-rwxr-xr-x  1 root  admin  34328 May  2  2014 /opt/local/bin/perl5.12*
-rwxr-xr-x  2 root  admin  41712 May 20 12:38 /opt/local/bin/perlthanks-5.16*
-rwxr-xr-x  1 root  admin  10802 May 20 12:38 /opt/local/bin/perlivp-5.16*
-rwxr-xr-x  1 root  admin    244 May 20 12:38 /opt/local/bin/perldoc-5.16*
-rwxr-xr-x  2 root  admin  41712 May 20 12:38 /opt/local/bin/perlbug-5.16*
lrwxr-xr-x  1 root  admin      8 May 20 12:38 /opt/local/bin/perl5.16.3@ -> perl5.16
-rwxr-xr-x  1 root  admin  34376 May 30 12:40 /opt/local/bin/perl5.16*
-rwxr-xr-x  2 root  admin  41739 Aug 17 19:00 /opt/local/bin/perlthanks-5.18*
-rwxr-xr-x  1 root  admin  10802 Aug 17 19:00 /opt/local/bin/perlivp-5.18*
-rwxr-xr-x  1 root  admin    244 Aug 17 19:00 /opt/local/bin/perldoc-5.18*
-rwxr-xr-x  2 root  admin  41739 Aug 17 19:00 /opt/local/bin/perlbug-5.18*
lrwxr-xr-x  1 root  admin      8 Aug 17 19:00 /opt/local/bin/perl5.18.2@ -> perl5.18
-rwxr-xr-x  1 root  admin  14008 Aug 17 19:00 /opt/local/bin/perl5.18*
-rwxr-xr-x  2 root  admin  45375 Nov  5 17:39 /opt/local/bin/perlthanks-5.20*
-rwxr-xr-x  1 root  admin  10802 Nov  5 17:39 /opt/local/bin/perlivp-5.20*
-rwxr-xr-x  1 root  admin    244 Nov  5 17:39 /opt/local/bin/perldoc-5.20*
-rwxr-xr-x  2 root  admin  45375 Nov  5 17:39 /opt/local/bin/perlbug-5.20*
lrwxr-xr-x  1 root  admin      8 Nov  5 17:39 /opt/local/bin/perl5.20.0@ -> perl5.20
-rwxr-xr-x  1 root  admin  14008 Nov  5 17:39 /opt/local/bin/perl5.20*
lrwxr-xr-x  1 root  admin     23 Nov 12 12:44 /opt/local/bin/perlthanks@ -> /usr/bin/perlthanks5.12
lrwxr-xr-x  1 root  admin     20 Nov 12 12:44 /opt/local/bin/perlivp@ -> /usr/bin/perlivp5.12
lrwxr-xr-x  1 root  admin     20 Nov 12 12:44 /opt/local/bin/perldoc@ -> /usr/bin/perldoc5.12
lrwxr-xr-x  1 root  admin     20 Nov 12 12:44 /opt/local/bin/perlbug@ -> /usr/bin/perlbug5.12
lrwxr-xr-x  1 root  admin     17 Nov 12 12:44 /opt/local/bin/perl@ -> /usr/bin/perl5.12

How am I supposed to fix this?

sudo port perl select lists the following

Available versions for perl:
	none
	perl5.10-apple.12
	perl5.12-apple.12 (active)

But I have other perl versions installed as stated by

sudo port installed perl*

The following ports are currently installed:
  perl5 @5.12.4_0+perl5_12 (active)
  perl5.12 @5.12.4_2
  perl5.12 @5.12.4_3
  perl5.12 @5.12.4_3+universal
  perl5.12 @5.12.5_0+universal (active)
  perl5.16 @5.16.1_3
  perl5.16 @5.16.3_0
  perl5.16 @5.16.3_0+universal (active)
  perl5.18 @5.18.2_0
  perl5.18 @5.18.2_1 (active)
  perl5.20 @5.20.0_2 (active)
  perl_select @0.3_0 (active)

comment:3 Changed 10 years ago by harciga

*RESOLVED*

Please close.

#45866 was also a perl issue and it gave me an idea on how to solve this

I did a $ port install perl5 +perl5_20; port select perl none; port activate perl5@5.12.4_0+perl5_20

Now sudo port installed perl* outputs

The following ports are currently installed:
  perl5 @5.12.4_0+perl5_12
  perl5 @5.12.4_0+perl5_16
  perl5 @5.12.4_0+perl5_20 (active)
  perl5.12 @5.12.4_2
  perl5.12 @5.12.4_3
  perl5.12 @5.12.4_3+universal
  perl5.12 @5.12.5_0+universal (active)
  perl5.16 @5.16.1_3
  perl5.16 @5.16.3_0
  perl5.16 @5.16.3_0+universal (active)
  perl5.18 @5.18.2_0
  perl5.18 @5.18.2_1 (active)
  perl5.20 @5.20.0_2 (active)
  perl_select @0.3_0 (active)

I have no idea where perl5 @5.12.4_0+perl5_16 came from but everything built fine anyway.

Perhaps the depends_lib should require a port:perl5.16 instead of a file dependency as recommended in https://guide.macports.org/#reference.dependencies.types given that this specific port will never build on OS X's perl due to #24779

comment:4 Changed 10 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.