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

Use newer libstdc++ #145

Open
sanjayankur31 opened this issue Jan 27, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@sanjayankur31
Copy link

commented Jan 27, 2019

The neuron code seems to bundle a really old version of libstdc++ in src/gnu. Would it be possible to use a more current version please? The bundled version is old enough that headers there are not in the current version any more.

@nrnhines

This comment has been minimized.

Copy link
Collaborator

commented Jan 27, 2019

I have to agree with you. But is it really a portion of libstdc++? Seems to be something someone gave
me circa 1992. Where should this come from now? Is it available in every c++ package?

@sanjayankur31

This comment has been minimized.

Copy link
Author

commented Jan 27, 2019

The headers seem to indicate libstdc++ which should be available with every c++ installation. It seems to have changed so much, though, that these headers no longer exist in the latest version of the standard c++ library.

The distribution related functions (binomial/weibull/poisson/discrete/normal/lognormal/lcg(?)), do seem to be defined in random.h. I'm still looking for the d_avec bit. It seems to be an implementation of vectors, and that's in the standard library also.

It'll take some looking to see exactly what neuron uses from src/gnu, how those bits are now included in the standard library now. I don't expect this to be a straightforward task, unfortunately---especially if there are local changes to the version neuron is bundling.

@pramodk

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2019

@nrnhines: could you tell when src/gnu is used?

@sanjayankur31: did you encountered any compilation issues?

@sanjayankur31

This comment has been minimized.

Copy link
Author

commented Jan 28, 2019

@sanjayankur31: did you encountered any compilation issues?

Yes, but I only got to the first step in unbundling: I simply removed the directory and any mentions of src/gnu in the autotools project files. That gave compilation errors, as the headers could not be found. I couldn't find the headers, so I didn't go to the next step of updating the sources with new headers.

@nrnhines

This comment has been minimized.

Copy link
Collaborator

commented Jan 28, 2019

@pramodk It is used for the hoc Random distributions, a few not so good Random generators, the Vector class, and the Complex arithmetic for the Impedance classes. Outside src/gnu, d_avec.h is included by ivocvec.h
and Complex.h is included by nrniv/impedanc.cpp The random .h files are included by ivocrand.cpp and ivoc/random1.h

As c++ code goes I never really had compile problems except with neuron_gnu_builtin.h
I believe it started out life as the file builtin.h but that long predates the git,hg,cvs repositories.
There are not many commits in the history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.