Hi,
found that error during docker build. Maybe isn’t really a problem, but should be solved?
./script/wasm-deps.sh: line 19: python: command not found
Detected arch:
./script/wasm-deps.sh: line 23: [: too many arguments
Looks like just missing python and works fine for amd64 / x86_64.
You need to install python inside of the dockerfile?
Hi,
found that error during docker build. Maybe isn't really a problem, but should be solved?
```
./script/wasm-deps.sh: line 19: python: command not found
Detected arch:
./script/wasm-deps.sh: line 23: [: too many arguments
```
Looks like just missing python and works fine for amd64 / x86_64.
You need to install python inside of the dockerfile?
Did the error occured in musl image? If so, I guess Debian image includes Python by default, though I didn’t run script actually. If not, I need to investigate.
Did the error occured in musl image? If so, I guess Debian image includes Python by default, though I didn't run script actually. If not, I need to investigate.
Maybe uname -m (type) and uname -p (processor) would be fine? Haven’t tested it with other types than x86_64...
Should be possible by `/proc/cpuinfo`, `lshw`, `uname -m`
* https://trisquel.info/en/forum/there-simple-command-find-out-your-architecture
* https://stackoverflow.com/questions/48678152/how-to-detect-386-amd64-arm-or-arm64-os-architecture-via-shell-bash
Maybe **uname -m (type)** and **uname -p (processor)** would be fine? Haven't tested it with other types than x86_64...
I’m not familiar with CPU archtectures but I think it’s okay if it is equivalent to what Python’s platform module does. I will see the module when I have time, although it will be far from now...
I'm not familiar with CPU archtectures but I think it's okay if it is equivalent to what Python's `platform` module does. I will see the module when I have time, although it will be far from now...
Maybe uname do the job?
```
~$ uname -m
x86_64
~$ uname -i
unknown
~$ uname -p
unknown
```
With my VM I get "unkown" for platform / processor, but maybe it works for arm and other types?
> I'm surprised no one suggested uname -m. On my laptop, this gives armv7l, while uname -a gives me a monstrous 2 lines of text.
https://stackoverflow.com/a/31862755/3470092
Could that related to my error in web developer console?
First time a see a rust error in frontend, I still believe frontend errors have to be javascript... g
Error loading Rust wasm module 'plume_front': RuntimeError: unreachable
at __rust_start_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5155]:0x156c47)
at rust_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5150]:0x156a78)
at _ZN3std9panicking20rust_panic_with_hook17hf5363eb24858966cE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5143]:0x15673d)
at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h99134a023967300aE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5130]:0x156180)
at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17he43b85e8fd3a20a9E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5129]:0x1560ff)
at rust_begin_unwind (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5142]:0x15663a)
at _ZN4core9panicking9panic_fmt17h125c8438143be5c3E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5217]:0x1582c9)
at _ZN4core9panicking5panic17heade1ff345fea9eeE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5211]:0x157632)
at _ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h80b0a2c815390be4E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4428]:0x12f27a)
at _ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17ha56011f5f98fbe30E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4427]:0x12f1db)
plume-front.wasm:0x156c47 Uncaught (in promise) RuntimeError: unreachable
at __rust_start_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5155]:0x156c47)
at rust_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5150]:0x156a78)
at _ZN3std9panicking20rust_panic_with_hook17hf5363eb24858966cE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5143]:0x15673d)
at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h99134a023967300aE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5130]:0x156180)
at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17he43b85e8fd3a20a9E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5129]:0x1560ff)
at rust_begin_unwind (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5142]:0x15663a)
at _ZN4core9panicking9panic_fmt17h125c8438143be5c3E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5217]:0x1582c9)
at _ZN4core9panicking5panic17heade1ff345fea9eeE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5211]:0x157632)
at _ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h80b0a2c815390be4E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4428]:0x12f27a)
at _ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17ha56011f5f98fbe30E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4427]:0x12f1db)
Could that related to my error in web developer console?
First time a see a rust error in frontend, I still believe frontend errors have to be javascript... *g*
```
Error loading Rust wasm module 'plume_front': RuntimeError: unreachable
at __rust_start_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5155]:0x156c47)
at rust_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5150]:0x156a78)
at _ZN3std9panicking20rust_panic_with_hook17hf5363eb24858966cE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5143]:0x15673d)
at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h99134a023967300aE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5130]:0x156180)
at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17he43b85e8fd3a20a9E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5129]:0x1560ff)
at rust_begin_unwind (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5142]:0x15663a)
at _ZN4core9panicking9panic_fmt17h125c8438143be5c3E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5217]:0x1582c9)
at _ZN4core9panicking5panic17heade1ff345fea9eeE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5211]:0x157632)
at _ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h80b0a2c815390be4E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4428]:0x12f27a)
at _ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17ha56011f5f98fbe30E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4427]:0x12f1db)
plume-front.wasm:0x156c47 Uncaught (in promise) RuntimeError: unreachable
at __rust_start_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5155]:0x156c47)
at rust_panic (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5150]:0x156a78)
at _ZN3std9panicking20rust_panic_with_hook17hf5363eb24858966cE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5143]:0x15673d)
at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17h99134a023967300aE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5130]:0x156180)
at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17he43b85e8fd3a20a9E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5129]:0x1560ff)
at rust_begin_unwind (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5142]:0x15663a)
at _ZN4core9panicking9panic_fmt17h125c8438143be5c3E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5217]:0x1582c9)
at _ZN4core9panicking5panic17heade1ff345fea9eeE (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[5211]:0x157632)
at _ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h80b0a2c815390be4E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4428]:0x12f27a)
at _ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17ha56011f5f98fbe30E (https://example.com/static/cached/b5ad6c82/plume-front.wasm:wasm-function[4427]:0x12f1db)
```
Easiest way with amd64 architecture was dpkg --print-architecture:
++ dpkg --print-architecture
+ ARCH=amd64
+ echo 'Detected arch: amd64'
Detected arch: amd64
+ '[' amd64 == aarch64 -o amd64 == armv71 ']'```
Just replaced the python part with:
ARCH=$(dpkg --print-architecture)
But need to be tested with other arch like armv71, aarch64, ...
Easiest way with amd64 architecture was `dpkg --print-architecture`:
```# bash -x ./script/wasm-deps.sh
++ dpkg --print-architecture
+ ARCH=amd64
+ echo 'Detected arch: amd64'
Detected arch: amd64
+ '[' amd64 == aarch64 -o amd64 == armv71 ']'```
Just replaced the python part with:
```
ARCH=$(dpkg --print-architecture)
```
But need to be tested with other arch like armv71, aarch64, ...
Quick and dirty replacement inside of my Dockerfile removes the python dependency for amd64:
RUN sed -i '/^ARCH/,/^EOF/d' script/plume-front.sh
RUN sed -i 's/^)$/ARCH=\$(dpkg --print-architecture)/' script/plume-front.sh
RUN sed -i '/^ARCH/,/^EOF/d' script/wasm-deps.sh
RUN sed -i 's/^)$/ARCH=\$(dpkg --print-architecture)/' script/wasm-deps.sh
Need to be tested with other arch systems...
I test the easiest shell replacement on debian based systems.
```
dpkg --print-architecture
```
https://stackoverflow.com/a/65535310/3470092
Quick and dirty replacement inside of my Dockerfile removes the python dependency for `amd64`:
```
RUN sed -i '/^ARCH/,/^EOF/d' script/plume-front.sh
RUN sed -i 's/^)$/ARCH=\$(dpkg --print-architecture)/' script/plume-front.sh
RUN sed -i '/^ARCH/,/^EOF/d' script/wasm-deps.sh
RUN sed -i 's/^)$/ARCH=\$(dpkg --print-architecture)/' script/wasm-deps.sh
```
Need to be tested with other arch systems...
Hi,
found that error during docker build. Maybe isn’t really a problem, but should be solved?
Looks like just missing python and works fine for amd64 / x86_64.
You need to install python inside of the dockerfile?
Did the error occured in musl image? If so, I guess Debian image includes Python by default, though I didn’t run script actually. If not, I need to investigate.
Wouldn’t it be possible to remove the python dependecy to detect os arch?
It’s possible. In fact it’s better!
Should be possible by
/proc/cpuinfo
,lshw
,uname -m
Maybe uname -m (type) and uname -p (processor) would be fine? Haven’t tested it with other types than x86_64...
I’m not familiar with CPU archtectures but I think it’s okay if it is equivalent to what Python’s
platform
module does. I will see the module when I have time, although it will be far from now...Note:
Can’t test with other hardware...
or
lscpu
https://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/
dmidecode -t processor
Maybe uname do the job?
With my VM I get “unkown” for platform / processor, but maybe it works for arm and other types?
https://stackoverflow.com/a/31862755/3470092
Could that related to my error in web developer console?
First time a see a rust error in frontend, I still believe frontend errors have to be javascript... g
Easiest way with amd64 architecture was
dpkg --print-architecture
:ARCH=$(dpkg --print-architecture)
I test the easiest shell replacement on debian based systems.
https://stackoverflow.com/a/65535310/3470092
Quick and dirty replacement inside of my Dockerfile removes the python dependency for
amd64
:Need to be tested with other arch systems...