Closed Wildcarde closed 9 months ago
Hi, the dbase warnings are false positives. Can you grep the lines with actual errors?
On Tue, 5 Mar 2024, 01:06 Garrett Mc., @.***> wrote:
I've attempted to build this in rock 9 and ubuntu 22, it will not build in either situation complaining instead about a myriad of c/c++ errors and failing out. If you build from latest you get complaints of:
In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'void write_dbheader(dbase_header)': ./src/dgate/src/odbci.cpp:541:8: warning: 'ssize_t write(int, const void, size_t)' reading 32 bytes from a region of size 4 [-Wstringop-overread] 541 | write(th->filehandle,&th->junk1,32); / write the header / |
~^~~~~~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: source object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:378:16: note: in a call to function 'ssize_t write(int, const void, size_t)' declared with attribute 'access (read_only, 2, 3)' 378 | extern ssize_t write (int __fd, const void buf, size_t n) wur | ^~~~~ In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'void read_dbheader(dbase_header)': ./src/dgate/src/odbci.cpp:548:7: warning: 'ssize_t read(int, void, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=] 548 | read(th->filehandle,&th->junk1,32); / and read the header / |~~^~~~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: destination object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:371:16: note: in a call to function 'ssize_t read(int, void, size_t)' declared with attribute 'access (write_only, 2, 3)' 371 | extern ssize_t read (int __fd, void __buf, size_t nbytes) wur | ^~~~ In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'int dbase_open(char*, dbase_header*)': ./src/dgate/src/odbci.cpp:760:12: warning: 'ssize_t read(int, void, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=] 760 | rret=read(h,&(th)->junk1,32); / read 'raw' header / |~~^~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: destination object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:371:16: note: in a call to function 'ssize_t read(int, void, size_t)' declared with attribute 'access (write_only, 2, 3)' 371 | extern ssize_t read (int fd, void *__buf, size_t nbytes) wur | ^~~~And if you try to build 1.50d you will get a different error pointing to the dgate.cpp file and complaining about a pointer comparison that is unsafe.
— Reply to this email directly, view it on GitHub https://github.com/marcelvanherk/Conquest-DICOM-Server/issues/37, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVDWJKUA4BYCLJ6FSQUUZ3YWULAFAVCNFSM6AAAAABEGGVO26VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DQMBXGM3DGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
conquest compiles and runs just fine on Ubuntu22 if you have all the prerequisites.
Taken from the Docker container (also in the linux manual):
sudu apt update sudu apt -y install make gettext-base git apache2 php libapache2-mod-php g++ lua5.1 liblua5.1-0 lua-socket p7zip-full sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 /usr/lib/x86_64-linux-gnu/liblua5.1.so
Note that the last line depends on the processor architecture. This may be the thing you had missed.
The warning is from code that has been running stable for over 30 years. I always inspect every warning but stopped trying to fix false positives.
Marcel
On Tue, Mar 5, 2024 at 1:06 AM Garrett Mc. @.***> wrote:
I've attempted to build this in rock 9 and ubuntu 22, it will not build in either situation complaining instead about a myriad of c/c++ errors and failing out. If you build from latest you get complaints of:
In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'void write_dbheader(dbase_header)': ./src/dgate/src/odbci.cpp:541:8: warning: 'ssize_t write(int, const void, size_t)' reading 32 bytes from a region of size 4 [-Wstringop-overread] 541 | write(th->filehandle,&th->junk1,32); / write the header / |
~^~~~~~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: source object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:378:16: note: in a call to function 'ssize_t write(int, const void, size_t)' declared with attribute 'access (read_only, 2, 3)' 378 | extern ssize_t write (int __fd, const void buf, size_t n) wur | ^~~~~ In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'void read_dbheader(dbase_header)': ./src/dgate/src/odbci.cpp:548:7: warning: 'ssize_t read(int, void, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=] 548 | read(th->filehandle,&th->junk1,32); / and read the header / |~~^~~~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: destination object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:371:16: note: in a call to function 'ssize_t read(int, void, size_t)' declared with attribute 'access (write_only, 2, 3)' 371 | extern ssize_t read (int __fd, void __buf, size_t nbytes) wur | ^~~~ In file included from ./src/dgate/src/total.cpp:156: ./src/dgate/src/odbci.cpp: In function 'int dbase_open(char*, dbase_header*)': ./src/dgate/src/odbci.cpp:760:12: warning: 'ssize_t read(int, void, size_t)' writing 32 bytes into a region of size 4 overflows the destination [-Wstringop-overflow=] 760 | rret=read(h,&(th)->junk1,32); / read 'raw' header / |~~^~~~~~ In file included from ./src/dgate/src/dgate.hpp:72, from ./src/dgate/src/vrtosql.cpp:88, from ./src/dgate/src/total.cpp:124: ./src/dgate/src/odbci.hpp:237:17: note: destination object 'dbase_header::junk1' of size 4 237 | char junk1[4]; / Dbase III file header format / | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from ./src/dgate/dicomlib/unixsock.h:41, from ./src/dgate/dicomlib/base.hpp:58, from ./src/dgate/dicomlib/dicom.hpp:50, from ./src/dgate/dicomlib/qrsop.cxx:55, from ./src/dgate/src/total.cpp:122: /usr/include/unistd.h:371:16: note: in a call to function 'ssize_t read(int, void, size_t)' declared with attribute 'access (write_only, 2, 3)' 371 | extern ssize_t read (int fd, void *__buf, size_t nbytes) wur | ^~~~And if you try to build 1.50d you will get a different error pointing to the dgate.cpp file and complaining about a pointer comparison that is unsafe.
— Reply to this email directly, view it on GitHub https://github.com/marcelvanherk/Conquest-DICOM-Server/issues/37, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVDWJKUA4BYCLJ6FSQUUZ3YWULAFAVCNFSM6AAAAABEGGVO26VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DQMBXGM3DGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Strangely this is now all building as expected you don't need to do the symlink on the latest ubuntu containers that already exists. Only major change I made was the installed packages list: from:
apt-get install -y unzip gcc g++ apache2 \
p7zip-full lua5.1 lua-socket\
luarocks git wget expect gettext sed make
to:
apt-get install -y unzip make gettext-base git apache2 php libapache2-mod-php \
g++ lua5.1 liblua5.1-0 lua-socket p7zip-full luarocks git wget expect gettext sed
I suspect it was in fact missing our incorrect dependencies.
I've attempted to build this in rocky 9 and ubuntu 22, it will not build in either situation complaining instead about a myriad of c/c++ errors and failing out. If you build from latest you get complaints of:
And if you try to build 1.50d you will get a different error pointing to the dgate.cpp file and complaining about a pointer comparison that is unsafe.