Hi all.
I think this might be a question for Jim.
I'm having issues compiling NGSPICE from a GIT download from last Friday (Feb 28 2020)
The compiler is having issues with functions declared as 'inline', specifically in the pre-master branch. I checkecked out scope-inpcom-21 and this complied without issue.
I'm using Make V3.82 on CentOS 7 (7-7.1908.0.el7.centos.x86_64 to be precise)
My procedure was:
git clone git://ngspice.git.sourceforge.net/gitroot/ngspice/ngspice
git checkout pre-master
./autogen.sh --adms
mkdir release_adms
cd release_adms
../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp --enable-adms --enable-pss --prefix=/usr/share/ngspice_2020_02_28
make 2>&1 | tee make.log
I'm including the log file for reference.
--
Kind regards,
Justin Fisher
Hi Justin,
made same configuration under Ubuntu without the set to release_adms dir which worked for me. But setting into the dir I got an libtool error with the libekv. Maybe your error is related.
Kind Regards,
Dietmar
Thanks, Dietmar!
--
Kind regards,
Justin Fisher.
Update:
This issue only appears in the pre-master branch, that I have tried. It's
not in the master branch, nor scope-inpcom-21, nor optran.
--
Kind regards,
Justin Fisher.
On Fri, Mar 6, 2020 at 12:27 PM Justin Fisher justin0419@users.sourceforge.net wrote:
Related
Support Requests:
#48Pre-master branch gets continuous updates for bug fixing. The 'inline' declaration issues have been removed.
Maybe you give it another try with today's sources..
I just downloaded and compiled from GIT. I still have the same issue in the
pre-master branch.
--
Kind regards,
Justin Fisher.
Last edit: Justin Fisher 2020-03-12
Justin,
I just set on my old CentOS:
[dwarning@server release_adms]$ uname -a
Linux server.xyz.local 2.6.32-754.17.1.el6.x86_64 #1 SMP Tue Jul 2
12:42:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[dwarning@server release_adms]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
I made same steps as you, except X11 activation. And I must agree - any
function with inline declaration was complained. No problem with Ubuntu.
Thank you for pointing again to this problem.
Dietmar
Am 12.03.2020 um 10:01 schrieb Justin Fisher:
Related
Support Requests:
#48gcc 4.4 (or 4.8 from CentOS 7) are pretty old compilers. gcc 9.2 is the current release. Do we need to be compatible to the old stuff?
The compile failure is not the inline warnings, but a missing definition of controlled_exit.
You may test one thing:
ngspice.h, line 228
replace
#if defined(__GNUC__)
by
#if (__GNUC__ > 6)
and check if compilation then is successfully running to its end.
CentOS7 is a common used OS in EDA. We should support gcc 4.8 at least.
90% of the places I work (and that's a lot of places) use either Centos 7
or Red Hat 7. Mostly they do so because of its stability - which means they
never use the most up-to-date (or even close to up-to-date) anything. That
means GCC 4.8 is used more or less everywhere. I do believe we should
support this version.
--
Kind regards,
Justin Fisher.
Currently I am using gcc 7.4 on SUSE Linux.
When I compile ngspice with configure setting:
../configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp CFLAGS="-m64 -O0 -g -Wall -Wextra -fgnu89-inline" LDFLAGS="-m64 -g"
then I get the same warnings and error message as reported by Justin. With the flag
-fgnu89-inline
I reverted back to a 1989 standard. See https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html . This is 30 years old, and we certainly will not support this any more.When I set the option
-fno-gnu89-inline
, compiling is o.k. Please test this option, e.g. adding it to the CFLAGS.An alternative CFLAGS might be
-std=c99
A configure setting for a speed optimized 64 bit ngspice then is
Holger
Hi Holger.
../configure --with-x --enable-xspice --enable-cider --with-readline=yes
--enable-openmp --disable-debug CFLAGS="-m64 -O2 -std=c99" LDFLAGS="-m64 -s"
This works, thanks.
--
Kind regards,
Justin Fisher.
Yes - forcing my old compiler gcc 4.4.7 by the -std=c99 switch will work.
The macro AC_PROG_CC_C99 in configure.ac will also work, but shows problems with prototype recognition.