Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 415023

Summary: sci-libs/geos-3.3.2 USE=php - geos.c: In function 'noticeHandler': geos.c:83:27: error: 'tsrm_ls' undeclared (first use in this function)
Product: Gentoo Linux Reporter: Eric Johnson <tokenmathematician>
Component: Current packagesAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED FIXED    
Severity: normal CC: pgsql-bugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
environment
emerge info
emerge pretend

Description Eric Johnson 2012-05-07 14:58:54 UTC
Building sci-libs/geos-3.3.2 fails when php use flag is selected. First error seems to be here:

geos.c:83:27: error: 'tsrm_ls' undeclared (first use in this function)

Maybe a configure flag (--enable-php) not used?

Reproducible: Always

Steps to Reproduce:
1. keyword sci-libs/geos (for postgis-2.0.0 dependency)
2. enable php use flag in sci-libs/geos
2. emerge sci-libs/geos

Actual Results:  
build fails

Expected Results:  
build succeeds

Package successfully builds when php flag is not selected.
Comment 1 Eric Johnson 2012-05-07 14:59:55 UTC
Created attachment 311087 [details]
build.log
Comment 2 Eric Johnson 2012-05-07 15:00:08 UTC
Created attachment 311089 [details]
environment
Comment 3 Eric Johnson 2012-05-07 15:00:27 UTC
Created attachment 311091 [details]
emerge info
Comment 4 Eric Johnson 2012-05-07 15:00:40 UTC
Created attachment 311093 [details]
emerge pretend
Comment 5 Eric Johnson 2012-05-09 15:03:05 UTC
From the ./php/README in the source tarball: 

"Just add --enable-php to your GEOS configure line and run 'make'"

However, the ebuild already makes a call to $(use_enable php).

Compiling just the php module produces the same error

$ cd php
$ make

...
geos.c:83:27: error: 'tsrm_ls' undeclared (first use in this function)
...

What is this TSRMLS_CC macro anyway? Will have to do some reading...
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2012-05-24 20:36:00 UTC
Geos, as any other crazy-minded-upstream science library is not threadsafe at all.

So -threads on php solves our issue.

Fixed (well rewrite would be better than forced usedep...) in cvs.