"emcc" command does not recognized

1,068 views
Skip to first unread message

Harsha Jayaweera

unread,
Jun 11, 2015, 1:13:52 AM6/11/15
to emscripte...@googlegroups.com
I'm having issue with building this demo.

when i cd into this folder and run make command i get this error message:

/bin/sh: 1: emcc: not found
make: *** [segmentation] Error 127

this is how make file looks like.

segmentation: ../src/segmentation.cpp ../src/export.cpp
mkdir -p $(OBJDIR)
emcc \
../src/segmentation.cpp \
../src/export.cpp \
-I $(OPENCV_INSTALL_DIR)/include \
$(OPENCV_INSTALL_DIR)/lib/libopencv_core.so \
$(OPENCV_INSTALL_DIR)/lib/libopencv_imgproc.so \
-s EXPORTED_FUNCTIONS="['_on_mouse', '_on_init', '_on_process']" \
-O3 \
--llvm-lto 1 \
--closure 1 \
-s PRECISE_F32=1 \
-s FORCE_ALIGNED_MEMORY=1 \
-s TOTAL_MEMORY=306777216 \
-o ./bin/segmentation.js

clean:
rm ./bin/*.js ./bin/*.mem
.......



i guess it does not recognize "emcc" command. is there any specific environment variable i have to set to get this command working.

Alon Zakai

unread,
Jun 11, 2015, 12:13:32 PM6/11/15
to emscripte...@googlegroups.com
You may need to add emcc to your path, if you see an error like that.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harsha Jayaweera

unread,
Jun 11, 2015, 10:39:40 PM6/11/15
to emscripte...@googlegroups.com
Can you please tell me to where.... I have already set my environment variable set in .emscripten. as EMSCRIPTEN_ROOT.
"..../emsdk_portable/emscripten/master" is the path where i have pointed as "EMSCRIPTEN_ROOT" but still it does not recognize the command "emcc".
Is there any where else i have to set the path variable.
Any help would be greatly appreciated.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Harsha Jayaweera

unread,
Jun 11, 2015, 10:41:53 PM6/11/15
to emscripte...@googlegroups.com
Can you please tell me to where.... I have already set my environment variable set in .emscripten. as EMSCRIPTEN_ROOT.
"..../emsdk_portable/emscripten/master" is the path where i have pointed as "EMSCRIPTEN_ROOT" but still it does not recognize the command "emcc".
Is there any where else i have to set the path variable.
Any help would be greatly appreciated.


Harsha Jayaweera

unread,
Jun 11, 2015, 10:42:58 PM6/11/15
to emscripte...@googlegroups.com

Alon Zakai

unread,
Jun 11, 2015, 10:48:58 PM6/11/15
to emscripte...@googlegroups.com
Setting the path is something that depends on your system. A search for setting the path + your OS should find a result.

You will need to add the directory containing "emcc" to the path. Where that is depends on how you installed emscripten, and which OS you are on.

- Alon


To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Harsha Jayaweera

unread,
Jun 13, 2015, 2:49:57 AM6/13/15
to emscripte...@googlegroups.com
Thanks. I added it to environment in ubuntu and now it works fine. but then it gave following error:
"ERROR root: Compiler settings are incompatible with fastcomp. You can fall back to the older compiler core, although that is not recommended"
 
Solution i found for this is to set EMCC_FAST_COMPILER=0. it solved the above issue and now i'm getting this error:
"Non-fastcomp compiler is no longer available, please use fastcomp or an older version of emscripten"

How can i fix this. am i missing something here. I did exactly what emscripten's documentation has mentioned in their installation guide and their test sample programs in master\tests folder are also compiling and working fine. is there any issue with my make file. or anything i should be aware of.

Sorry for my confusion. I'm bit new to this.
Can you please tell me how can i solve this. and what am i thinking in wrong way. 


On Thursday, June 11, 2015 at 10:43:52 AM UTC+5:30, Harsha Jayaweera wrote:

Harsha Jayaweera

unread,
Jun 13, 2015, 8:15:57 AM6/13/15
to emscripte...@googlegroups.com
I found the solution to my issue. In new version fastcomp compiler is enabled by default and Non-fastcomp compiler is no longer support. and issue with fast-comp compiler was my make file contains FORCE_ALIGNED_MEMORY flag which is not supported by new version. so i simply removed it and now my program compiled fine. but i didn't install it but i guess it will work too. Thanks everyone for helping.
Reply all
Reply to author
Forward
0 new messages