New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testcase: incorrect sizeof report for ./configure scripts on x86_64 host #2093

Open
diddledan opened this Issue Feb 4, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@diddledan

diddledan commented Feb 4, 2014

Running a ./configure script through emconfigure which checks the sizeof unsigned long will report that it's 8 instead of 4. I've created a cut-down example which illustrates the issue. It's as small as I could get it and is self-contained at: https://github.com/diddledan/emscripten-testcase1

@kripken

This comment has been minimized.

Owner

kripken commented Feb 4, 2014

Try with EMCONFIGURE_JS=1 in the env, that should force configure to use js and not emulate through native builds. If that fixes it, we should raise the priority of enabling that by default.

@diddledan

This comment has been minimized.

diddledan commented Feb 4, 2014

I tried but it doesn't seem to fix it.

I ran EMCONFIGURE_JS=1 emconfigure ./configure which reports among it's output: "checking size of unsigned long... 8", the config.h has the same value and the compiled program reports the failed test with the sizeof long int differing from the value from the configure script.

@kripken

This comment has been minimized.

Owner

kripken commented Feb 4, 2014

Ok, the issue is that the testcase uses file IO. In that case, even in EMCONFIGURE_JS we fallback to native.

@inolen , could we use the node file stuff you did to fix that? We would need the configure-generated programs to read files and write files from the disk, basically just like a native executable.

@aidanhs

This comment has been minimized.

Contributor

aidanhs commented Oct 29, 2014

Adding -m32 to the cflags by the appropriate mechanism fixes this for me.

matzbot pushed a commit to ruby/ruby that referenced this issue Feb 15, 2018

gc.c: force STACK_GROW_DIRECTION for emscripten
The configure script fails to guess the direction on emscripten.
Perhaps this is because of kripken/emscripten#2093

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment