matteolucchini1 / matteolucchini1/BHJet

SegFault (Mac OS Big Sur)

Open
#31 1 comment 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
C++
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

When slirping, I needed to edit my Makefile as follows:

1. Including the /opt/local/include in SLANGINC = -I/usr/local/include -I/opt/local/include
2. Adding `pkg-config --cflags gsl` in CC_COMPILE/CXX_COMPILE/FC_COMPILE

Then the make step goes as usual:
$> make

/opt/local/bin/g++ -g -O2 -fno-common -I. -I/usr/local/include -I/opt/local/include -I. `pkg-config --cflags gsl` -c bhjet_glue.cc
bhjet_glue.cc: In function 'int SLang_pop_opaque(SLtype, void**, Slirp_Opaque**)':
bhjet_glue.cc:291:33: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
291 | SLang_verror (SL_INVALID_PARM, "%s", "slirp: pop_opaque: instance=NULL");
| ^~~~

/opt/local/bin/g++ -dynamiclib -single_module -install_name /usr/local/lib/slang/v2/modules/bhjet-module.so.1 -current_version 1.0.0 -o bhjet-module.so bhjet_glue.o bhjet.o utils.o jetpars.o BBody.o Cyclosyn.o Mixed.o Particles.o ShSDisk.o Compton.o Kappa.o Powerlaw.o Radiation.o Thermal.o Bknpower.o -L/opt/local/lib -lgsl -lgslcblas -lm -L/usr/local/lib -lslang \
-ldl -lm
touch bhjet-module.so || true

Type '/Applications/Xcode.app/Contents/Developer/usr/bin/make test' to nominally verify bhjet-module.so.

While the make test fails:

$> make test
slsh -n bhjet-test.sl
Namespace "Global" already exists
Namespace "Global" already exists
make: *** [test] Segmentation fault: 11

No idea where this is coming from...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Makefile and reproduce `make test` on Mac OS Big Sur, then inspect the failure around bhjet-test.sl and the module built from bhjet_glue.cc. Use the reported “Namespace "Global" already exists” messages and segmentation fault as the stopping point; done means `make test` completes without the crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.