Opened 12 years ago

Closed 9 years ago

#35310 closed defect (fixed)

netpbm needs to use standard intel interfaces rather than gcc __builtins

Reported by: pmetzger (Perry E. Metzger) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager)
Port: netpbm

Description (last modified by jeremyhu (Jeremy Huddleston Sequoia))

It appears that clang lacks some of the intrinsics supplied by gcc, and that building netpbm under xcode 4.4 results in the following error message. This is rather important, as netpbm is a dependency of many packages.

/usr/bin/clang -c -I.  -Iimportinc -Iimportinc/netpbm -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_netpbm/netpbm/work/advanced/editor/pamflip  -DNDEBUG  -I/opt/local/include -O3 -arch x86_64    -o pamflip_sse.o pamflip_sse.c
pamflip_sse.c:136:39: error: use of unknown builtin '__builtin_ia32_pcmpeqb128' [-Wimplicit-function-declaration]
        register v16qi const compare =__builtin_ia32_pcmpeqb128(vReg,zero128);
                                      ^
pamflip_sse.c:136:30: error: initializing 'const v16qi' with an expression of incompatible type 'int'
        register v16qi const compare =__builtin_ia32_pcmpeqb128(vReg,zero128);
                             ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
gnumake[2]: *** [pamflip_sse.o] Error 1
gnumake[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_netpbm/netpbm/work/advanced/editor/pamflip'

Change History (13)

comment:1 Changed 12 years ago by nerdling (Jeremy Lavergne)

Cc: jeremyhu@… added

OP believes that clang is missing an sse intrinsic from gcc.

comment:2 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Description: modified (diff)

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Since ML is now out, I can now discuss this.

netpbm needs to change. clang is behaving correctly. netpbm assumes that it has access to __builtin_ia32_pcmpeqb128, but it doesn't. clang dropped suport for the GCC-specific builtin and now supports the standard _mm_cmpeq_epi8.

<rdar://problem/11858813>

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Keywords: MountainLion XCode4.4 added

comment:5 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from macports-tickets@… to cal@…

comment:6 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

r95870 should work around the issue for now, but it should still be fixed.

comment:7 Changed 12 years ago by neverpanic (Clemens Lang)

Keywords: MountainLion XCode4.4 removed
Priority: HighNormal

Jeremy, do you want to take this upstream? Other than the line you wrote I have no idea what the problem is about, but you seem to have more information. The website suggests mailing to the local part bryanh below giraffe-data.com.

comment:9 Changed 12 years ago by neverpanic (Clemens Lang)

Has duplicate #35156.

comment:11 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: netpbm broken under xcode 4.4 -- clang problemnetpbm needs to use standard intel interfaces rather than gcc __builtins

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

Replying to jeremyhu@…:

r95870 should work around the issue for now, but it should still be fixed.

In netpbm 10.60.00 they changed their check to no longer try to use these GCC-specific functions with clang so I removed the patch in r112197.

Replying to cal@…:

Jeremy, do you want to take this upstream? Other than the line you wrote I have no idea what the problem is about, but you seem to have more information. The website suggests mailing to the local part bryanh below giraffe-data.com.

I emailed the developer about this.

comment:13 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:14 Changed 9 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

So this seems to be fixed.

Note: See TracTickets for help on using tickets.