[MDEV-24881] Compilation fails for ARMHF architecture due to missing Atomic library Created: 2021-02-16  Updated: 2021-02-18  Resolved: 2021-02-16

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Graeme Kidd Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Attachments: Text File libatomic.patch    
Issue Links:
Duplicate
duplicates MDEV-23892 Fails to compile on platforms that re... Closed

 Description   

When I try to compile the source on the Raspberry Pi I get

sudo apt-get install devscripts
mkdir ~/mariadb && cd ~/mariadb
git clone --recursive --depth 1 -b 10.5 https://github.com/MariaDB/server.git
cd server && ./debian/autobake-deb.sh

The following atomic error appears in the log (See full log here):

...
[ 24%] Building C object storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/mrb/mrb_table_sort_key.c.o
cd /home/pi/mariadb/server/builddir/storage/mroonga/vendor/groonga/lib && /usr/bin/cc -DDBUG_TRACE -DGRN_DAT_EXPORT -DGRN_EMBEDDED -DHAVE_CONFIG_H -DONIG_EXTERN=extern -D_FILE_OFFSET_BITS=64 -DHAVE_ONIGMO_H -DMRB_INT64 -I/home/pi/mariadb/server/storage/mroonga/vendor/groonga/lib -I/home/pi/mariadb/server/storage/mroonga/vendor/groonga/include -I/home/pi/mariadb/server/builddir/storage/mroonga/vendor/groonga -I/home/pi/mariadb/server/wsrep-lib/include -I/home/pi/mariadb/server/wsrep-lib/wsrep-API/v26 -I/home/pi/mariadb/server/builddir/include -I/home/pi/mariadb/server/storage/mroonga/vendor/groonga/lib/dat  -g -O2 -fdebug-prefix-map=/home/pi/mariadb/server=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -Wall -Wno-unused-but-set-variable -Wno-pointer-sign -Wformat -Wstrict-aliasing=2 -fno-strict-aliasing -Wno-disabled-optimization -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -fexceptions -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-implicit-fallthrough -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wdeclaration-after-statement -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Wvla -Wwrite-strings -fPIC   -Wdate-time -D_FORTIFY_SOURCE=2  -std=gnu99 -o CMakeFiles/libgroonga.dir/mrb/mrb_table_sort_key.c.o   -c /home/pi/mariadb/server/storage/mroonga/vendor/groonga/lib/mrb/mrb_table_sort_key.c
/usr/bin/ld: ../../mysys/libmysys.a(my_open.c.o): in function `my_close':
./builddir/mysys/./mysys/my_open.c:109: undefined reference to `my_atomic_add32'
/usr/bin/ld: ../../mysys/libmysys.a(my_open.c.o): in function `my_register_filename':
./builddir/mysys/./mysys/my_open.c:137: undefined reference to `my_atomic_add32'
collect2: error: ld returned 1 exit status
...

To get the entire project to build I need to apply the attached patch file which adds the atomic linked library to the project where it is needed.

Would it be possible to fix the make files in a way that adds atomic library when needed?



 Comments   
Comment by Daniel Black [ 2021-02-16 ]

Duplicate of MDEV-23892

Generated at Thu Feb 08 09:33:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.