Skip to content
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

Unable to build on Debian buster 32 bits #1153

Closed
sebas891 opened this issue May 3, 2020 · 10 comments
Closed

Unable to build on Debian buster 32 bits #1153

sebas891 opened this issue May 3, 2020 · 10 comments
Labels
enhancement Improvement of an existing feature type:server-side

Comments

@sebas891
Copy link

sebas891 commented May 3, 2020

I'm trying to build on a fresh Debian 10/buster 32bits with 2300GB of ram now, with the following instruction:

$ sudo -i -u invidious
$ cd invidious
$ shards update && shards install
$ crystal build src/invidious.cr --release

I get this compilation error:

invidious@invidious:~/test/invidious$ crystal build src/invidious.cr --release --error-trace                                                                   
GC Warning: Repeated allocation of very large block (appr. size 397312):                                                                                       
        May lead to memory leak and poor performance                                                                                                           
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(lsquic_conn.c.o)' is incompatible wit
h i386 output                                                                                                                                                  
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(lsquic_engine.c.o)' is incompatible w
ith i386 output                                                                                                                                                
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(lsquic_ev_log.c.o)' is incompatible w
ith i386 output                                                                                                                                                
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(lsquic_full_conn.c.o)' is incompatibl

.....

/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(x509_att.c.o)' is incompatib[25/1353]
386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_akey.c.o)' is incompatible with i3
86 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_bitst.c.o)' is incompatible with i
386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_enum.c.o)' is incompatible with i3
86 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_extku.c.o)' is incompatible with i
386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_ia5.c.o)' is incompatible with i38
6 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(v3_int.c.o)' is incompatible with i38
6 output
/usr/bin/ld: /home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a(bcm.c.o): in function `BN_mod_word':                                        
/tmp/boringssl/crypto/fipsmodule/bn/div.c:803: undefined reference to `__umodti3'                                                                             
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/invidious/test/invidious/invidious'  -rdynamic  /home/invidious/test/invidious/lib/lsquic
/src/lsquic/ext/liblsquic.a -lz -lyaml -lxml2 -lsqlite3 -lz /home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/libssl.a `command -v pkg-config > /dev/nul
l && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` /home/invidious/test/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a /home/invidi
ous/test/invidious/lib/lsquic/src/lsquic/ext/libcrypto.a `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcry
pto'` -lpcre -lm /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/b
in/../lib/crystal/lib`

Maybe it's something related in the bug #721 so I did try your suggestion, and I get the same error message.

#721 (comment)

@mendel5
Copy link
Contributor

mendel5 commented May 4, 2020

I also cannot build Invidious on Debian. My system is Debian 10.3 (x86-64). When I try to deploy Invidious with Docker, I get this error:

Building invidious
Step 1/18 : FROM alpine:edge
 ---> 24cae4d038c0
Step 2/18 : RUN apk add --no-cache crystal shards libc-dev     yaml-dev libxml2-dev sqlite-dev zlib-dev curl &&     curl -Lo /etc/apk/keys/omarroth.rsa.pub https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/omarroth.rsa.pub &&     curl -Lo boringssl-dev.apk https://github.com/omarroth/boringssl-alpine/releases/download/1.1.0-r0/boringssl-dev-1.1.0-r0.apk &&     curl -Lo lsquic.apk https://github.com/omarroth/lsquic-alpine/releases/download/2.6.3-r0/lsquic-2.6.3-r0.apk &&     apk update &&     apk add boringssl-dev.apk lsquic.apk &&     rm -rf /var/cache/apk/* boringssl-dev.apk lsquic.apk
 ---> Using cache
 ---> 7dc29ad37ecf
Step 3/18 : WORKDIR /invidious
 ---> Using cache
 ---> e45b8b94c1ef
Step 4/18 : COPY ./shard.yml ./shard.yml
 ---> Using cache
 ---> bd19aa24de16
Step 5/18 : RUN shards update && shards install
 ---> Using cache
 ---> 0fbe96454e56
Step 6/18 : RUN cp /usr/lib/libcrypto.a ./lib/lsquic/src/lsquic/ext/libcrypto.a &&     cp /usr/lib/libssl.a ./lib/lsquic/src/lsquic/ext/libssl.a &&     cp /usr/lib/liblsquic.a ./lib/lsquic/src/lsquic/ext/liblsquic.a
 ---> Using cache
 ---> 08cde886ebcd
Step 7/18 : COPY ./src/ ./src/
 ---> Using cache
 ---> 77ef3502e56f
Step 8/18 : COPY ./.git/ ./.git/
 ---> Using cache
 ---> 3ebd2dfe863a
Step 9/18 : RUN crystal build --release --warnings all --error-on-warnings     -Dmusl     ./src/invidious.cr
 ---> Running in 4b1da454067e
Showing last frame. Use --error-trace for full trace.
 
In lib/pg/src/pq/connection.cr:170:20
 
 170 | rescue e : Errno
                  ^----
Error: Errno is not a subclass of Exception
ERROR: Service 'invidious' failed to build: The command '/bin/sh -c crystal build --release --warnings all --error-on-warnings     -Dmusl     ./src/invidious.cr' returned a non-zero code: 1

@gripped
Copy link
Contributor

gripped commented May 9, 2020

I had this error trying to build the release version.
On a aws t3.micro instance, Ubuntu 18.04, 2G swap file. And again with Centos (aws), And again on a local xubuntu 18.04 KVM with 8G of ram.
Using git master instead of release worked.

Already added this comment here tmiland/invidious-updater#27 then realised that was the issues for the updater, not the main project. But both obviously affected.

@mendel5
Copy link
Contributor

mendel5 commented May 11, 2020

@gripped
So as described in the README.md of tmiland/Invidious-Updater you installed Invidious like this:

  1. Update Invidious
  • Do you want to checkout Invidious release or master?
    b. master

Is that correct?

@gripped
Copy link
Contributor

gripped commented May 11, 2020

No it was option 1

  1. Install Invidious
    Picking Release resulted in the error you reported. Picking Master worked.
    I have since updated with option 2. And picked Master.

@mendel5
Copy link
Contributor

mendel5 commented May 11, 2020

Ok, thanks! I will try it.

@mendel5
Copy link
Contributor

mendel5 commented May 21, 2020

I finally got Invidious to run on my local machine!
OS is Ubuntu Desktop 20.04. I used this script : https://github.com/tmiland/Invidious-Updater .

@Perflyst Perflyst added the question Further information is requested label May 26, 2020
@adnan360
Copy link

My build also failed on Debian buster/stable under i686. First I tried the docker image, didn't work. Then tried native Linux install instructions.

My attempt ended with:

$ crystal build src/invidious.cr --release
...
...
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(v3_ia5.c.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/home/invidious/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(v3_int.c.o)' is incompatible with i386 output
/usr/bin/ld: /home/invidious/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a(bcm.c.o): in function `BN_mod_word':
(.text+0x237d6): undefined reference to `__umodti3'
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o /home/invidious/invidious/invidious  -rdynamic -L/usr/bin/../lib/crystal/lib /home/invidious/invidious/lib/lsquic/src/lsquic/ext/liblsquic.a -lyaml -lxml2 -lsqlite3 -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl`

Full log

Please add support for 32 bit machines. Although it is rare now, there are still usable machines out there. Something basic such as watching YT should be supported on them.

@TheFrenchGhosty TheFrenchGhosty added enhancement Improvement of an existing feature priority:low type:server-side and removed question Further information is requested labels Aug 20, 2020
@TheFrenchGhosty
Copy link
Member

32 bit is dead, so this is really not a priority.

@omarroth
Copy link
Contributor

You'll want to build liblsquic.a for your architecture, see #1328.

@unixfox
Copy link
Member

unixfox commented Apr 17, 2022

32bits support for intel x86 is abandoned by crystal: crystal-lang/crystal#9463 (comment) so we can't support 32 bits in invidious.

@unixfox unixfox closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of an existing feature type:server-side
Projects
None yet
Development

No branches or pull requests

8 participants