AsmBB

Power
Login Register

Error in compile source code
0

#16333 (ツ) WayLuk
Last edited: 09.06.2023 by WayLuk, read: 2573 times

I try to use the ./install/create_release.sh to generate the asmbb, when it come to the "Compiling SQLite" step, the commandline will show a error like this:


./sqlite3.c:16708:20: warning: ‘sqlite3UserAuthCheckLogin’ used but never defined
16708 | SQLITE_PRIVATE int sqlite3UserAuthCheckLogin(sqlite3*,const char*,u8*);

But still will show "Building process finished successfully." later, but the the asmbb service will not able to start:


asmbb forum engine FastCGI script.
     Loaded: loaded (/etc/systemd/system/asmbb.service; disabled; vendor preset: enabl>
     Active: failed (Result: exit-code) since Tue 2023-06-06 22:47:42 CST; 898ms ago
    Process: 255688 ExecStart=/var/www/asmbb/install/asmbb/engine (code=exited, status=217/USER)
   Main PID: 255688 (code=exited, status=217/USER)

Jun 06 22:47:42 way systemd[1]: asmbb.service: Scheduled restart job, restart coun>
Jun 06 22:47:42 way systemd[1]: Stopped asmbb forum engine FastCGI script..
Jun 06 22:47:42 way systemd[1]: asmbb.service: Start request repeated too quickly.
Jun 06 22:47:42 way systemd[1]: asmbb.service: Failed with result 'exit-code'.
Jun 06 22:47:42 way systemd[1]: Failed to start asmbb forum engine FastCGI script

and as you can see, that's not help for find the error, but if I try to start the engine file directly in commandline, it will show the same error as the compile step:

root@way:/var/www/asmbb/install/asmbb# ./engine
Error relocating ./libsqlite3.so: sqlite3UserAuthCheckLogin: symbol not found

Is it the real error? sqlite3UserAuthCheckLogin not found?

Attached files:
FileSizeUploadedDownloadsMD5 hash
compile error about the sqlite function.png43997 bytes06.06.20232638b62cc08f4a6dcfd6bb338cf36641c81
#16337 (ツ) johnfound
Created 07.06.2023, read: 2550 times
WayLuk

I try to use the ./install/create_release.sh to generate the asmbb, when it come to the "Compiling SQLite" step, the commandline will show a error like this:


./sqlite3.c:16708:20: warning: ‘sqlite3UserAuthCheckLogin’ used but never defined
16708 | SQLITE_PRIVATE int sqlite3UserAuthCheckLogin(sqlite3*,const char*,u8*);

But still will show "Building process finished successfully." later, but the the asmbb service will not able to start:


asmbb forum engine FastCGI script.
     Loaded: loaded (/etc/systemd/system/asmbb.service; disabled; vendor preset: enabl>
     Active: failed (Result: exit-code) since Tue 2023-06-06 22:47:42 CST; 898ms ago
    Process: 255688 ExecStart=/var/www/asmbb/install/asmbb/engine (code=exited, status=217/USER)
   Main PID: 255688 (code=exited, status=217/USER)

Jun 06 22:47:42 way systemd[1]: asmbb.service: Scheduled restart job, restart coun>
Jun 06 22:47:42 way systemd[1]: Stopped asmbb forum engine FastCGI script..
Jun 06 22:47:42 way systemd[1]: asmbb.service: Start request repeated too quickly.
Jun 06 22:47:42 way systemd[1]: asmbb.service: Failed with result 'exit-code'.
Jun 06 22:47:42 way systemd[1]: Failed to start asmbb forum engine FastCGI script

and as you can see, that's not help for find the error, but if I try to start the engine file directly in commandline, it will show the same error as the compile step:

root@way:/var/www/asmbb/install/asmbb# ./engine
Error relocating ./libsqlite3.so: sqlite3UserAuthCheckLogin: symbol not found

Is it the real error? sqlite3UserAuthCheckLogin not found?

Well, at first, you should not use /install/create_release.sh in order to compile AsmBB from sources.

The script you run is aimed not to compile everything from sources, but to create the binary package of the project (the file asmbb.tar.gz) for releasing.

Please, use this post as a manual about compilation from sources: AsmBB how to download, compile and install.

Nonetheless, the problem you mentioned is not OK. It is not in the create_release.sh, but in the musl_sqlite/build script.

Please, try to download the latest versions of the sources, because this script was recently updated.

At first, enter into the directory /musl_sqlite (it must contains only two files: build and README) and run build from there.

You can use it without arguments or with one argument with value of sqlite, sqleet or sqlitemc (default).

As a result this script should create the files ld-musl-i386.so (MUSL library) and libsqlite3.so (SQLite, SQLeet or SQLite3MultipleCiphers depending on the argument used).

Also the script leaves in the directory two files: musl-latest.tar.gz - the downloaded, latest version of MUSL and sqlite3.c – the amalgamated version of sqlite used in the build process. (it can be actually SQLite3, SQLeet or SQLite3MultipleCiphers).

#16338 (ツ) WayLuk
Created 08.06.2023, read: 2529 times
johnfound

Well, at first, you should not use /install/create_release.sh in order to compile AsmBB from sources.

The script you run is aimed not to compile everything from sources, but to create the binary package of the project (the file asmbb.tar.gz) for releasing.

Please, use this post as a manual about compilation from sources: AsmBB how to download, compile and install.

Nonetheless, the problem you mentioned is not OK. It is not in the create_release.sh, but in the musl_sqlite/build script.

Please, try to download the latest versions of the sources, because this script was recently updated.

At first, enter into the directory /musl_sqlite (it must contains only two files: build and README) and run build from there.

You can use it without arguments or with one argument with value of sqlite, sqleet or sqlitemc (default).

As a result this script should create the files ld-musl-i386.so (MUSL library) and libsqlite3.so (SQLite, SQLeet or SQLite3MultipleCiphers depending on the argument used).

Also the script leaves in the directory two files: musl-latest.tar.gz - the downloaded, latest version of MUSL and sqlite3.c – the amalgamated version of sqlite used in the build process. (it can be actually SQLite3, SQLeet or SQLite3MultipleCiphers).

I try to use the latest version of source code to compile and got this error:


Compiling SQLite ...
/usr/bin/ld: /tmp/cc3dZwJV.o: warning: relocation against `sha256_transform' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a shared object

but still show "Building process finished successfully."

I compile the engine with the Fresh software, seems everything is fine, but if I try to start the asmbb.service, it seem have the same error of "Failed to start asmbb forum engine FastCGI script". (and it also error if I just use the asmbb.tar.gz directly)

If I try to run the "engine" file directory in commandline, it will show "-bash: ./engine: No such file or directory".

So seem it have multiply errors some how.

#16339 (ツ) johnfound
Created 08.06.2023, read: 2526 times
WayLuk

I try to use the latest version of source code to compile and got this error:


Compiling SQLite ...
/usr/bin/ld: /tmp/cc3dZwJV.o: warning: relocation against `sha256_transform' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a shared object

but still show "Building process finished successfully."

I compile the engine with the Fresh software, seems everything is fine, but if I try to start the asmbb.service, it seem have the same error of "Failed to start asmbb forum engine FastCGI script". (and it also error if I just use the asmbb.tar.gz directly)

If I try to run the "engine" file directory in commandline, it will show "-bash: ./engine: No such file or directory".

So seem it have multiply errors some how.

Well, it looks strange and should work. The mentioned errors are simply warnings.

Please, pack the whole asmbb directory (including the templates) into tar.gz and attach it here for analyze.

Also, describe your environment: what Linux distribution, what versions of gcc?

There was some problems reported in this ticket, maybe your case is somehow related...

I will try to research this problem and fix it. Thanks for the report.

#16340 (ツ) WayLuk
Last edited: 09.06.2023 by WayLuk, read: 2518 times
johnfound

Well, it looks strange and should work. The mentioned errors are simply warnings.

Please, pack the whole asmbb directory (including the templates) into tar.gz and attach it here for analyze.

Also, describe your environment: what Linux distribution, what versions of gcc?

There was some problems reported in this ticket, maybe your case is somehow related...

I will try to research this problem and fix it. Thanks for the report.

I select the tar.gz file in the Attach file then submit but seem like it didn't upload or it do? I'm using wsl, gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)

#16341 (ツ) johnfound
Created 09.06.2023, read: 2516 times
WayLuk

I select the tar.gz file in the Attach file then submit but seem like it didn't upload or it do?

I am sorry, my fault. The attachment size limit was set to 1MB only. Now I have increased it up to 20MB, so try again. Or post the size of your archive file if it is still bigger.

#16343 (ツ) WayLuk
Created 09.06.2023, read: 2513 times
johnfound

I am sorry, my fault. The attachment size limit was set to 1MB only. Now I have increased it up to 20MB, so try again. Or post the size of your archive file if it is still bigger.

Ok, already upload the tar.gz file.

Attached files:
FileSizeUploadedDownloadsMD5 hash
asmbb.tar.gz1704669 bytes09.06.2023291f28458bc5c8d97a16b7a0c97d93b28cb
#16344 (ツ) johnfound
Created 09.06.2023, read: 2510 times
WayLuk
johnfound

I am sorry, my fault. The attachment size limit was set to 1MB only. Now I have increased it up to 20MB, so try again. Or post the size of your archive file if it is still bigger.

Ok, already upload the tar.gz file.

Well, on my computer, your archive actually starts and works. With the exception, that the engine executable has no execution permissions in the archive. After chmod +x ./engine it starts successfully and creates an empty database.

Another problem is that in your archive all symlinks are converted into text files, which breaks the file structure of the templates. It is understandable if you are using WSL with NTFS file system, but is not acceptable for the engine.

For normal work of AsmBB some native Unix file system is highly recommended. Or, as an alternative serious rebuild of the templates directory replacing all symlinks (hundreds actually) with a copies of the real files.

#16345 (ツ) WayLuk
Created 09.06.2023, read: 2509 times
johnfound

Ok, already upload the tar.gz file.

Well, on my computer, your archive actually starts and works. With the exception, that the engine executable has no execution permissions in the archive. After chmod +x ./engine it starts successfully and creates an empty database.

Another problem is that in your archive all symlinks are converted into text files, which breaks the file structure of the templates. It is understandable if you are using WSL with NTFS file system, but is not acceptable for the engine.

For normal work of AsmBB some native Unix file system is highly recommended. Or, as an alternative serious rebuild of the templates directory replacing all symlinks (hundreds actually) with a copies of the real files.

I try to change the fastcgi service user from 'NON-ROOT' to 'root' and it success to start up, so I don't need to care about other errors? And this "NON-ROOT", is that I need to create a other user to fill in?

#16346 (ツ) johnfound
Created 09.06.2023, read: 2506 times
WayLuk

I try to change the fastcgi service user from 'NON-ROOT' to 'root' and it success to start up, so I don't need to care about other errors? And this "NON-ROOT", is that I need to create a other user to fill in?

Running AsmBB as a root user is highly not recommended and inherently not safe.

If you want to run AsmBB on localhost, for your own tests, well, it can be kind of workaround. But never use such setup in production.

I would recommend to format c: and install some normal, community driven Linux distribution. Windows has the infamous ability to do everything the wrong way. rofl

#16347 (ツ) WayLuk
Created 09.06.2023, read: 2504 times
johnfound

Running AsmBB as a root user is highly not recommended and inherently not safe.

If you want to run AsmBB on localhost, for your own tests, well, it can be kind of workaround. But never use such setup in production.

I would recommend to format c: and install some normal, community driven Linux distribution. Windows has the infamous ability to do everything the wrong way. rofl

Ok, thank you! I actually have an other one distribute version of linux, I just get usually to use the default one. Maybe docker will be a better choose?

#16348 (ツ) johnfound
Last edited: 09.06.2023 by johnfound, read: 2503 times
WayLuk

Maybe docker will be a better choose?

There was a discussion about docker some time ago: https://board.asm32.info/docker-support.256/. AsmBB works fine with docker.

IMHO, using docker is over-complication. But well, some people like it.

#16387 (ツ) JosephStalin
Created 12.03.2024, read: 1108 times

Skill issue

Error in compile source code
0

AsmBB v3.0 (check-in: a316dab8b98d07d9); SQLite v3.42.0 (check-in: 831d0fb2836b71c9);
©2016..2023 John Found; Licensed under EUPL. Powered by Assembly language Created with Fresh IDE