Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 424411 - media-libs/freetype-2.4.10 fails to build on OS X 10.7.4
Summary: media-libs/freetype-2.4.10 fails to build on OS X 10.7.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-01 15:53 UTC by Timothy Miller
Modified: 2012-07-18 06:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (build.log,561.80 KB, text/plain)
2012-07-01 15:53 UTC, Timothy Miller
Details
environment (environment,113.19 KB, text/plain)
2012-07-01 15:53 UTC, Timothy Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Miller 2012-07-01 15:53:37 UTC
Created attachment 316879 [details]
Build log

* Messages for package media-libs/freetype-2.4.10:

 * removing -fno-strict-aliasing because F77 rejected it
 * removing -fno-strict-aliasing because FC rejected it
 * ERROR: media-libs/freetype-2.4.10 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =media-libs/freetype-2.4.10',
 * the complete build log and the output of 'emerge -pqv =media-libs/freetype-2.4.10'.
 * The complete build log is located at '/Users/millerti/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/temp/build.log'.
 * The ebuild environment file is located at '/Users/millerti/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/temp/environment'.
 * Working directory: '/Users/millerti/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/work/freetype-2.4.10'
 * S: '/Users/millerti/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/work/freetype-2.4.10'
Comment 1 Timothy Miller 2012-07-01 15:53:52 UTC
Created attachment 316881 [details]
environment
Comment 2 Fabian Groffen gentoo-dev 2012-07-01 18:54:21 UTC
something is wrong here, as it cannot compile even a single file, looks like a wrong compiler flag (-ansi?) or missing include somewhere
Comment 3 Timothy Miller 2012-07-01 19:20:20 UTC
No trouble compiling any of the other packages.  Just this one.
Comment 4 Christoph Junghans gentoo-dev 2012-07-02 15:21:33 UTC
Same for me on amd64-linux and x86-macos, 1st error:

/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/work/freetype-2.4.10/include/freetype/fttypes.h:172:3: error: unknown type name 'FT_UInt32'
/Gentoo/var/tmp/portage/media-libs/freetype-2.4.10/work/freetype-2.4.10/include/freetype/fttypes.h:333:3: error: unknown type name 'ft_ptrdiff_t'
Comment 5 Victor Ruehle 2012-07-05 15:21:16 UTC
Same issue here, gentoo prefix, the 2.4.9-r1 build works.

The problem seems to be the different ftconfig.h
./builds/unix/ftconfig.h
./include/freetype/config/ftconfig.h

The first one contains configure flags, the second the type definitions.

The gcc call to compile ftsystem contains -DFT_CONFIG_CONFIG_H=<ftconfig.h>, which enforces that the first ftconfig.h is used and the type definitions are missing. The file compiles if i manually execute the gcc command and remove the -DFT_CONFIG_CONFIG_H
Comment 6 Fabian Groffen gentoo-dev 2012-07-08 18:02:48 UTC
thanks for the clues, found this in the meanwhile
http://lists.gnu.org/archive/html/freetype/2009-03/msg00042.html

but it is still black voodoo to me why it fails, it should find its own headers, apparently, but it doesn't like it
Comment 7 Benda Xu gentoo-dev 2012-07-13 11:46:39 UTC
reproduced the same error on amd64-linux but not on amd64 (native gentoo)
Comment 8 Fabian Groffen gentoo-dev 2012-07-13 11:49:49 UTC
I think the problem here is related to the includes.  The build does an include of ftconfig.h, which also exists in the live system (be it prefix, be it host).  However, it seems the internal copy of ftconfig.h is just in the search-path, first.  It is unclear to me what _should_ have been included.
Comment 9 Steven Trogdon 2012-07-17 20:38:55 UTC
I've observed this failure here on amd64-linux and x86-linux. It appears that in prefix ./builds/unix/ftconfig.in is being overwritten because eautoreconf is called. I don't know what the intended behavior is but ftconfig.in isn't overwritten on native gentoo. The following

@@ -67,12 +67,8 @@
                fi
        fi
 
-       if use prefix; then
-               cd "${S}"/builds/unix
-               eautoreconf
-       else
-               elibtoolize
-       fi
+       elibtoolize
+
        epunt_cxx
 }

does allow building in prefix. Now if the eautoreconf is added to native gentoo then ./builds/unix/ftconfig.in is overwritten and the build fails as in prefix. I don't know whether eautoreconf should be called but if it is, it seems something else needs to be done in the ebuild.
Comment 10 Christoph Junghans gentoo-dev 2012-07-17 20:50:27 UTC
(In reply to comment #9)
> I've observed this failure here on amd64-linux and x86-linux. It appears
> that in prefix ./builds/unix/ftconfig.in is being overwritten because
> eautoreconf is called. I don't know what the intended behavior is but
> ftconfig.in isn't overwritten on native gentoo. The following
> 
> @@ -67,12 +67,8 @@
>                 fi
>         fi
>  
> -       if use prefix; then
> -               cd "${S}"/builds/unix
> -               eautoreconf
> -       else
> -               elibtoolize
> -       fi
> +       elibtoolize
> +
>         epunt_cxx
>  }
> 
> does allow building in prefix. Now if the eautoreconf is added to native
> gentoo then ./builds/unix/ftconfig.in is overwritten and the build fails as
> in prefix. I don't know whether eautoreconf should be called but if it is,
> it seems something else needs to be done in the ebuild.
Works on my x86-macos system as well.

What was the original intent of that conditional?
Comment 11 Fabian Groffen gentoo-dev 2012-07-18 06:54:56 UTC
good question, seems like removing it is no problem (probaby a remnant from the past)
Comment 12 Fabian Groffen gentoo-dev 2012-07-18 06:59:12 UTC
(In reply to comment #9)
> I've observed this failure here on amd64-linux and x86-linux. It appears
> that in prefix ./builds/unix/ftconfig.in is being overwritten because
> eautoreconf is called. I don't know what the intended behavior is but
> ftconfig.in isn't overwritten on native gentoo. The following

I've removed it, and it compiles like a charm now.  Thanks a lot for diving into this!