On Fri, Nov 11, 2022 at 5:13 PM João Carlos <jocm.agu...@gmail.com> wrote:

> I installed Emscripten on Linux Debian 10 and followed the installation
> step by step according to the link
> <https://emscripten.org/docs/getting_started/downloads.html>.
>
> But when I run the command (./emcc -v) to see the version I get the
> following message in the terminal ( bash: ./emcc: No such file or directory
> ) ?
>
> I also did the environment test by hanging around the command in the
> terminal ( ./emcc --check ) and I get the following message ( bash: ./emcc:
> No such file or directory ) ?
>

The commands that start with `./` are designed to be run from the
emscripten directory itself.   If you use emcc or otherwise have emcc in
your PATH then you can/should just type `emcc --check` (without the leading
`./`).


>
> I tried to make a compilation using the command ( emcc test -o test.html )
> compiling only the file ( test.wasm ) and generating the error in the
> terminal:
>
> error: undefined symbol: htons (referenced by $inetPton6__deps:
> ['htons','$jstoi_q'], referenced by $writeSockaddr__deps:
> ['$Sockets','$inetPton4','$inetPton6','$zeroMemory'], referenced by
> __syscall_recvfrom__deps:
> ['$getSocketFromFD','$writeSockaddr','$DNS','$SYSCALLS'], referenced by
> top-level compiled C/C++ code)
> warning: To disable errors for undefined symbols use
> `-sERROR_ON_UNDEFINED_SYMBOLS=0`
> warning: _htons may need to be added to EXPORTED_FUNCTIONS if it arrives
> from a system library
> error: undefined symbol: ntohs (referenced by $inetNtop6__deps:
> ['$inetNtop4','ntohs'], referenced by $readSockaddr__deps:
> ['$Sockets','$inetNtop4','$inetNtop6','ntohs'], referenced by
> $getSocketAddress__deps: ['$readSockaddr','$FS','$DNS'], referenced by
> __syscall_sendto__deps:
> ['$getSocketFromFD','$getSocketAddress','$SYSCALLS'], referenced by
> top-level compiled C/C++ code)
> warning: _ntohs may need to be added to EXPORTED_FUNCTIONS if it arrives
> from a system library
> Error: Aborting compilation due to previous errors
> emcc: error: '/home/aguiar/emsdk/node/14.18.2_64bit/bin/node
> /home/aguiar/emsdk/upstream/emscripten/src/compiler.js
> /tmp/tmptufh6kbr.json' failed (returned 1)
>
> How can I solve ?
>

This could be a dependency issue with our system libraries, but its hard to
tell from the information you have provided.

In the `emcc test -o test.html` command you mention what is `test`?  Is it
a source file or an object file?    Can you share the source code?

cheers,
sam

>
> --
> 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-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/ba4b0942-19f4-41b2-9eb4-d9e366c001ean%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/ba4b0942-19f4-41b2-9eb4-d9e366c001ean%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29hvHE0AufY31NWEaQShtVaPsS%3Dq8rn%3D%2BvfX_eE7ZYvjA%40mail.gmail.com.

Reply via email to