Just for fun I tried to compile brl-cad (a constructive solid geometrymodeling
system) on my Pi4. To my surprise, it came close(ish) to working, I think.‘ged_overlay_core’:
The configure stage ran to completion, and make got to the ~90% mark before reporting:
[ 89%] Linking C shared library ../../../libexec/ged/libged-otranslate.so /home/bob/brlcad-code/src/libged/overlay/overlay.c: In function
/home/bob/brlcad-code/src/libged/overlay/overlay.c:245:63: error: passingargument 5 of ‘icv_image_size
’ from incompatible pointer type [-Wincompatible-pointer-types]&lheight)) {
if (!icv_image_size(NULL, 0, (size_t)sbuf.st_size, type, &lwidth,
Has anybody else tried this, and gotten past? It looks as if maybe the ccompiler is
being more strict than absolutely necessary (or maybe expected by thedevelopers).
Thanks for reading, and any thoughts....
bob prohaska
Just for fun I tried to compile brl-cad (a constructive solid geometrymodeling
system) on my Pi4. To my surprise, it came close(ish) to working, I think.???ged_overlay_core???:
The configure stage ran to completion, and make got to the ~90% mark before reporting:
[ 89%] Linking C shared library ../../../libexec/ged/libged-otranslate.so /home/bob/brlcad-code/src/libged/overlay/overlay.c: In function
/home/bob/brlcad-code/src/libged/overlay/overlay.c:245:63: error: passingargument 5 of ???icv_image_size
??? from incompatible pointer type [-Wincompatible-pointer-types]&lheight)) {
if (!icv_image_size(NULL, 0, (size_t)sbuf.st_size, type, &lwidth,
Has anybody else tried this, and gotten past? It looks as if maybe the ccompiler is
being more strict than absolutely necessary (or maybe expected by thedevelopers).
Thanks for reading, and any thoughts....
On 2020-09-26, bob prohaska <bp@www.zefox.net> wrote:
Just for fun I tried to compile brl-cad (a constructive solid geometry modeling
system) on my Pi4. To my surprise, it came close(ish) to working, I think. >>
On the brl-wiki they ask for any failures to be reported to them. They
might be able to help you :-)
newer gcc version treating a parameter such as "-pedantic-errors"
with more pedantry, in which case you might just be able to remove
that option from the Makefile and it might run alright.
Just for fun I tried to compile brl-cad (a constructive solid geometrymodeling
system) on my Pi4. To my surprise, it came close(ish) to working, I think.‘ged_overlay_core’:
The configure stage ran to completion, and make got to the ~90% mark before reporting:
[ 89%] Linking C shared library ../../../libexec/ged/libged-otranslate.so /home/bob/brlcad-code/src/libged/overlay/overlay.c: In function
/home/bob/brlcad-code/src/libged/overlay/overlay.c:245:63: error: passingargument 5 of ‘icv_image_size
’ from incompatible pointer type [-Wincompatible-pointer-types]&lheight)) {
if (!icv_image_size(NULL, 0, (size_t)sbuf.st_size, type, &lwidth,
Has anybody else tried this, and gotten past? It looks as if maybe the ccompiler is
being more strict than absolutely necessary (or maybe expected by thedevelopers).
I tried and had the same error on my 3B+. I tried a couple of things to
pass -Wno-incompatible-pointer-types but didn't get it right but then
just tried passing -DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF to cmake and
that made it pass. That option removed at least -pedantic and -pedantic-errors from CFLAGS and/or CXXFLAGS and that warning was then
just a warning.
Tests pass except for two in the regress suite and they fail due to
timeout. However, mged just crashes when I try to start it.
At this point I've updated sources and am starting over with
make clean. There were a few updates in libspr, perhaps that'll help.
Then again, maybe it'll make things worse 8-)
Thanks very much for posting!
bob prohaska
and re-running make seems to have let the compile finish, but as you observe mged won't run:
bob@raspberrypi:~/brlcad-code/build $ mged
BRL-CAD Release 7.32.1 Geometry Editor (MGED)
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2
bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
bu_semaphore_free(): pthread_mutex_destroy() failed on [6] of [10]
bob@raspberrypi:~/brlcad-code/build $ mged
BRL-CAD Release 7.32.1 Geometry Editor (MGED)
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2
bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
On Tue, 29 Sep 2020 00:27:34 -0000 (UTC), bob prohaska <bp@www.zefox.net> declaimed the following:where
bob@raspberrypi:~/brlcad-code/build $ mged
BRL-CAD Release 7.32.1 Geometry Editor (MGED)
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2
bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
That looks like some significant code error... Attempt to allocate a chunk of memory of SIZE 0!
It might be worth studying that log to see if you can determine
in the code this call occurs, and from there track down whatever
computation is being used to determine the size to be allocated. (Note:
that error message actually comes from a level below bu_malloc -- both bu_malloc and bu_calloc use the same alloc() function, with a parameter identifying which m/c mode to run in -- https://brlcad.org/docs/doxygen-r64112/d6/dcd/malloc_8c_source.xhtml ).
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
On Tue, 29 Sep 2020 00:27:34 -0000 (UTC), bob prohaskaI've put the backtrace at
<bp@www.zefox.net>
declaimed the following:
bob@raspberrypi:~/brlcad-code/build $ mged BRL-CAD Release 7.32.1 >>>Geometry Editor (MGED)That looks like some significant code error... Attempt to
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2 bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
allocate a
chunk of memory of SIZE 0!
It might be worth studying that log to see if you can determine
where
in the code this call occurs, and from there track down whatever
computation is being used to determine the size to be allocated. (Note:
that error message actually comes from a level below bu_malloc -- both
bu_malloc and bu_calloc use the same alloc() function, with a parameter
identifying which m/c mode to run in --
https://brlcad.org/docs/doxygen-r64112/d6/dcd/malloc_8c_source.xhtml ).
http://www.zefox.net/~fbsd/rpi4/mged-9973-bomb.log if anybody wants to
take a look.
The only things I can recgonize as errors in the logfile are a couple of "permission denied" errors apparently caused by the backtrace generation process. I don't think that's relevant, but perhaps I should point out
that the build and run were done as a regular user, with only the
install using root credentials.
There's already a support request in to the brlcad project, to which
I've added my $.02 so hopefully somebody will take note. Someday.....
bob prohaska <bp@www.zefox.net> writes:
and re-running make seems to have let the compile finish, but as you observe
mged won't run:
bob@raspberrypi:~/brlcad-code/build $ mged
BRL-CAD Release 7.32.1 Geometry Editor (MGED)
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2
bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
bu_semaphore_free(): pthread_mutex_destroy() failed on [6] of [10]
Yes, I had similar messages. BTW, are you directly connected to the
Raspberry Pi or over network?
I tried the build on a remote Debian 10
shell machine too. Mged doesn't run there either but the errors are
about OpenGL which makes sense, OpenGL doesn't really work over the
network. I thought maybe that's the problem with Raspberry Pi too but
haven't tried.
So if you're not directly connected, it's worth reporting this as a
bug. I may try that too later.
It's not even Greek to me, if it makes sense to somebody else any hints appreciated!
On Tue, 29 Sep 2020 20:34:06 +0000, bob prohaska wrote:
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:Its easy enough to see where malloc is called with a zero pointer,
On Tue, 29 Sep 2020 00:27:34 -0000 (UTC), bob prohaskaI've put the backtrace at
<bp@www.zefox.net>
declaimed the following:
bob@raspberrypi:~/brlcad-code/build $ mged BRL-CAD Release 7.32.1 >>>>Geometry Editor (MGED)That looks like some significant code error... Attempt to
Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2 bob@raspberrypi
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-5459-bomb.log
allocate a
chunk of memory of SIZE 0!
It might be worth studying that log to see if you can determine
where
in the code this call occurs, and from there track down whatever
computation is being used to determine the size to be allocated. (Note:
that error message actually comes from a level below bu_malloc -- both
bu_malloc and bu_calloc use the same alloc() function, with a parameter
identifying which m/c mode to run in --
https://brlcad.org/docs/doxygen-r64112/d6/dcd/malloc_8c_source.xhtml ).
http://www.zefox.net/~fbsd/rpi4/mged-9973-bomb.log if anybody wants to
take a look.
The only things I can recgonize as errors in the logfile are a couple of
"permission denied" errors apparently caused by the backtrace generation
process. I don't think that's relevant, but perhaps I should point out
that the build and run were done as a regular user, with only the
install using root credentials.
There's already a support request in to the brlcad project, to which
I've added my $.02 so hopefully somebody will take note. Someday.....
evidently because calloc, which called it wants zero 4 byte items, but I
lose it at that point thanks to so much stuff being <optimised out>
So all I'd suggest are: can you turn off crash dump optimisation and is
it possible this is connected with a screwed up configuration file? There seem to be a lot of zero values in what looks like system parameters.
HTH
I much prefer using a tracing system, i.e. I put trace events in my code
that are enabled from the command line, because often the triggering
event is a few steps back along the timeline from the code that crashed.
A trace log shows you that clearly while a stack dump often can't.
On Wed, 30 Sep 2020 07:13:30 -0000 (UTC)
Martin Gregorie <martin@mydomain.invalid> wrote:
I much prefer using a tracing system, i.e. I put trace events in my
code that are enabled from the command line, because often the
triggering event is a few steps back along the timeline from the code
that crashed.
A trace log shows you that clearly while a stack dump often can't.
The last time I used Java heavily for work I was seriously
considering using aspect weaving to hook a call trace log into the code dumping into a circular buffer.
Sorry, but not following here: Over the network _is_ a bug?
-DCMAKTests pass except for two in the regress suite and they fail due to
timeout. However, mged just crashes when I try to start it.
Using
cmake .. -DBRLCAD_ENABLE_STRICT=OFF -DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF
E_BUILD_TYPE=Release
Looks like I managed to build something that at least starts up. Not everything seems to work, I tried a simple tutorial but when it came
time to ray trace some simple objects I got error messages only.
cmake options were:-DBRLCAD_ENABLE_COMPILER_WARNINGS=NO -DBRLCAD_BUNDLED_LIBS=AUTO -DCMAKE_BUILD_TYPE=Release
cmake <src dir> -DBRLCAD_ENABLE_STRICT=NO
To make it detect X11 and OpenGL I had to add"/usr/lib32/X11;/usr/lib32;/usr/lib/i386-linux-gnu;/usr/lib/arm-linux-gnueabihf ")
/usr/lib/arm-linux-gnueabihf in two files, FindX11.cmake and
FindGL.cmake. Here's the diffs:
$ diff -u FindX11.cmake.org FindX11.cmake
--- FindX11.cmake.org 2020-09-30 17:12:37.550501468 +0300
+++ FindX11.cmake 2020-09-30 21:43:24.734950303 +0300
@@ -169,7 +169,7 @@
set(64BIT_DIRS ${64BIT_DIRS} /usr/lib/X11 /usr/lib)
endif(EXISTS "/usr/lib32" OR NOT EXISTS "/usr/lib64")
else(SEARCH_64BIT)
- set(32BIT_DIRS "/usr/lib32/X11;/usr/lib32;/usr/lib/i386-linux-gnu")
+ set(32BIT_DIRS
if(EXISTS "/usr/lib64" OR NOT EXISTS "/usr/lib32")"/usr/lib/X11;/usr/lib;/usr/lib/i386-linux-gnu;/usr/lib/arm-linux-gnueabihf")
set(32BIT_DIRS ${32BIT_DIRS} /usr/lib/X11 /usr/lib)
endif(EXISTS "/usr/lib64" OR NOT EXISTS "/usr/lib32")
$ diff -u FindGL.cmake.org FindGL.cmake
--- FindGL.cmake.org 2020-09-30 17:18:55.059802235 +0300
+++ FindGL.cmake 2020-09-30 21:42:35.315081010 +0300
@@ -172,7 +172,7 @@
if(SEARCH_64BIT)
set(64BIT_DIRS "/usr/lib64/X11;/usr/lib64;/usr/lib/x86_64-linux-gnu")
else(SEARCH_64BIT)
- set(32BIT_DIRS "/usr/lib/X11;/usr/lib;/usr/lib/i386-linux-gnu")
+ set(32BIT_DIRS
endif(SEARCH_64BIT)
set(OPENGL_LIB_SEARCH_PATH
Following the build instructions in the INSTALL file. You will need:
gcc (6+, e.g. 6.0.3)
g++ (6+, e.g. 6.0.3)
make (e.g. gnu make 3.8.0)
cmake (3.0.2 or newer)
All three of those have implicit dependencies on other packages.
You will also want to make sure that you have the X11 development
headers installed:
apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev
Other development packages needed to build on Debian-based platforms:
for building the Tcl/Tk libraries: libfontconfig-dev
for OpenGL: libglu1-mesa-dev
It seems possible at least some of these are redundant, but I can't
tell which..... All installed without any obvious complaints.
On Fri, 2 Oct 2020 03:38:49 -0000 (UTC), bob prohaska <bp@www.zefox.net> declaimed the following:hardware
Following the build instructions in the INSTALL file. You will need:
gcc (6+, e.g. 6.0.3)
g++ (6+, e.g. 6.0.3)
make (e.g. gnu make 3.8.0)
cmake (3.0.2 or newer)
All three of those have implicit dependencies on other packages.
You will also want to make sure that you have the X11 development
headers installed:
apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev
Other development packages needed to build on Debian-based platforms:
for building the Tcl/Tk libraries: libfontconfig-dev
for OpenGL: libglu1-mesa-dev
It seems possible at least some of these are redundant, but I can't
tell which..... All installed without any obvious complaints.
Off-hand, nothing you least appears to be redundant...
gcc is the plain C compiler
g++ is the C++ compiler
make is the build system
cmake is a system to build makefiles for use by make
The X11 stuff is the low-level core for interfacing to the X-Window protocol.
Tcl/Tk is a framework for developing GUI applications, and uses X-Window at its base
OpenGL is a standard for 2D/3D graphics rendering, often using
acceleration.
There are still no updates/replies to the support request on SourceForge at https://sourceforge.net/p/brlcad/support-requests/123/
A followup from you (since you fixed it) or me (if you don't want to bother) might help things along.
bob prohaska <bp@www.zefox.net> writes:
There are still no updates/replies to the support request on SourceForge at >> https://sourceforge.net/p/brlcad/support-requests/123/
A followup from you (since you fixed it) or me (if you don't want to bother)
might help things along.
If you want to follow-up, feel free. It seems to me there are a huge
number of bugs and feature requests that have gone unfixed, sometimes
for years. OTOH, the wiki is apparently editable (even anonymously) so
that might a good place to add some Raspberry Pi specific compilation
notes.
The cmake file changes might be best submitted in the patch department
on Sourceforge.
I can try to do these things this weekend.
Funny, I initially tried this compilation just to see if my little 3B+
could even build this project. And to see how long it would take. I
didn't save exact times but it was about two hours.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 73:51:20 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,496 |
Posted today: | 1 |