Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doris_core directory not compiling due to error in function declaration in orbitbk.hh #27

Open
CarloArpini opened this issue Mar 19, 2021 · 11 comments

Comments

@CarloArpini
Copy link

CarloArpini commented Mar 19, 2021

Hello, as stated in the title the Doris core directory won't compile after using the configure executable; this appears to be due the fact that during the definition of some friend functions in the orbitbk.hh file (namely the coordinates change ones) they are given fixed values for some arguments (such as MAXITER and CRITTERTIM or CRITTERPOS). I tried changing the code and the only thing that made compiling possible was not giving the friend functions their fixed arguments but at the same time re-defining out of the orbit class in the same header file the same functions, no longer as friend ones, with fixed arguments, as shown here: https://stackoverflow.com/questions/22533511/friend-declaration-specifying-a-default-argument-must-be-a-definition This made compiling possible but causes segmentation fault with sigsev. This issue seems to be present both in the version 4 and 5 of Doris. See attached files for what exactly was shown on my terminal. I'm using currently a macbook pro late 2013 15" with the latest version of MacOs Big Sur at the time (11.2.3) and with Xcode 12D4e version.
Schermata 2021-03-19 alle 14 08 55

@avalentino
Copy link

Hi @CarloArpini, the fix for this issue is in PR #5.
In particular the patch for this specific issue is 36782db.

Please let me know if it works for you on MacOSX

@CarloArpini
Copy link
Author

Hi @avalentino , just by changing that line of code according to the "fix build on modern compilers" nothing happens. I see though that in 8fa0365 you actually changed the orbitbk.hh file in a very similar manner to what I tried to do: you just redefined the functions outside of the orbit class, I tried defining them both outside the orbit class with fixed arguments and inside without fixed arguments. In both cases it compiles but the problem is that, when launching, it encounters segmentation fault on my machine:

Schermata 2021-03-20 alle 11 59 34

@avalentino
Copy link

Have you tried to apply the entire set of patches?

@CarloArpini
Copy link
Author

I tried but it actually causes errors in the compiling process.

@avalentino
Copy link

Can you please report the error?

@CarloArpini
Copy link
Author

Yes. To give you a bit of context it actually showed me different errors yesterday but I had an older version of gcc (8.2.0) while today I updated it to version 10; since then some errors disappeared, but still giving the make install command this shows on the screen:
Schermata 2021-03-21 alle 23 17 36

@avalentino
Copy link

OK; this seems not to be a build problem, rather a permission problem not related to Doris.
Maybe you can check filesystem permission or use a different install PREFIX.

@CarloArpini
Copy link
Author

I will look into that; for now, I tried to copy and paste the executables in the bin directory too just as a try, but as the previous times when launched, with the set of patches applied, it encounters segmentation fault (just as in the screenshot above)

@avalentino
Copy link

Sorry I can confirm that the patches still work on linux but I can also confirm that I have the same error that you reported on MacOSX.
My feeling is that it is something related to the clang compiler or new C++ standard so probably it can be fixed with some compiler flag but unfortunately I have no time to investigate.

If you find a solution please keep us updated.

@Shaunakde
Copy link

I tired setting the -std=c++98 flag for g++ but that didn't help. Is there a compiler version that works best?

@Shaunakde
Copy link

I was able to successfully compile using:

[root@c5d2e49fe830 src]# g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)

and

[root@c5d2e49fe830 src]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)

The easiest way to get a hold of these is to use the centos 6 docker image and do this.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants