Cross-compiling from Linux to mingw/win32 should set X off by default

RESOLVED DUPLICATE of bug 505739

Status

()

Firefox
Build Config
RESOLVED DUPLICATE of bug 505739
10 years ago
9 years ago

People

(Reporter: Michel Gutierrez, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.2) Gecko/2009021017 Minefield/3.0.2

When cross-compiling Firefox from linux to the win32 platform using mingw32 environment, the build system recognizes the X11 development files on the host system and generate compiler options to use the include files: -I/usr/include

As a result, regular (not X) include files are taken out of the host compiler rather than from the cross-compiler.

This problem goes away when specifying in the .mozconfig file:

ac_add_options --without-x

The --without-x option should be the default when compiling for windows.

Reproducible: Always

Steps to Reproduce:
Setup cross-compiling environment as described at https://developer.mozilla.org/en/Cross_Compile_Mozilla_for_Mingw32
Actual Results:  
...
Building deps for /home/mig/eclipse.workspace/mingw32/mozilla/js/src/jsapi.c
i686-mingw32-gcc -mno-cygwin -o jsapi.o -c  -DOSTYPE=\"WINNT\" -DOSARCH=WINNT -DEXPORT_JS_API  -DJS_USE_SAFE_ARENA -I/home/mig/eclipse.workspace/mingw32/mozilla/js/src -I. -I../../dist/include   -I../../dist/include/js -I../../dist/include/nspr     -I../../dist/sdk/include -I/home/mig/eclipse.workspace/mingw32/mozilla/js/src -I/usr/include -DMOZ_DISABLE_XPCOM_STDCALL  -I/usr/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -Wno-long-long -pedantic -fno-strict-aliasing -mms-bitfields -pipe  -DDEBUG -D_DEBUG -DDEBUG_mig -DTRACING -g  -DMOZ_DISABLE_XPCOM_STDCALL  -I/usr/include -DCROSS_COMPILE=1 -DWINVER=0x501 -D_WIN32_WINNT=0x501 -D_WIN32_IE=0x0500 -DMOZILLA_VERSION=\"1.9.0.2\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PERCENT=100 -DMOZ_MATHML=1 -DMOZ_ENABLE_CANVAS=1 -DMOZ_SVG=1 -DMOZ_SVG_FOREIGNOBJECT=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_DISABLE_VISTA_SDK_REQUIREMENTS=1 -DMOZ_DISABLE_PARENTAL_CONTROLS=1 -DMOZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DHAVE___CXA_DEMANGLE=1 -DMOZ_DEMANGLE_SYMBOLS=1 -DHAVE__UNWIND_BACKTRACE=1 -DMOZ_USER_DIR=\"Mozilla\" -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DMOZ_TREE_CAIRO=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -DMOZ_REFLOW_PERF=1 -DMOZ_REFLOW_PERF_DSP=1 -DMOZILLA_LOCALE_VERSION=\"1.9a1\" -DMOZILLA_REGION_VERSION=\"1.9a1\" -DMOZILLA_SKIN_VERSION=\"1.8\" -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /home/mig/eclipse.workspace/mingw32/mozilla/js/src/jsapi.c
In file included from /usr/include/stdlib.h:320,
                 from /home/mig/eclipse.workspace/mingw32/mozilla/js/src/jsapi.c:50:
/usr/include/sys/types.h:153: error: conflicting types for ‘uint’
/home/mig/eclipse.workspace/mingw32/mozilla/js/src/jsapi.c:46: error: previous declaration of ‘uint’ was here
... 

This is caused by the -I/usr/include that appears at 2 places in the compiler arguments.

Expected Results:  
No -I/usr/include in the compiler options

Discussion thread at http://groups.google.com/group/mozilla.dev.builds/browse_thread/thread/2d5ade8aa59bf600

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 505739
You need to log in before you can comment on or make changes to this bug.