簡體   English   中英

在ubuntu上用emscripten編譯ngspice時出現鏈接錯誤

[英]Linking error when compiling ngspice with emscripten on ubuntu

我正在嘗試在Ubuntu下使用emscripten編譯ngspice。 我正在Windows 8主機的hyper-v VM上運行64位Ubuntu 13.10。 我從以下網址下載了最新的穩定版本的ngpsice(ngspice-25): http ://ngspice.sourceforge.net/download.html,並按照INSTALL中的安裝說明測試了它的構建和運行正常(為簡單起見,省略了configure參數):

$ mkdir release
$ cd release
$ ../configure
$ make
$ sudo make install

所有這些都與gcc 4.8.1完美配合,我可以從命令行運行已編譯的ngspice。 接下來,我使用apt-get安裝了emscripten,它報告了該版本:

$ ~/Documents/srr/emscripten/emcc --version

emcc (Emscripten GCC-like replacement) 1.7.8 (commit 1a007b1631509b9d72499a8f4402294017ee04dc)
Copyright (C) 2013 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

這是我的clang版本:Debian clang版本3.2-7ubuntu1(標簽/ RELEASE_32 / final)(基於LLVM 3.2)目標:x86_64-pc-linux-gnu線程模型:posix

我的LLVM版本(由llvm-link報告):LLVM( http://llvm.org/ ):LLVM 3.2版優化了構建。 建成於2013年6月7日(18:44:38)。 默認目標:x86_64-pc-linux-gnu主機CPU:corei7

使用emscripten編譯hello-world.cpp並在nodeJS中運行正常。

然后,我將emscripten編譯器替換為configure步驟,如下所示:

$ CC=~/Documents/srr/emscripten/emcc ../configure

這是配置步驟的輸出:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... /home/samreid/Documents/srr/emscripten/emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/samreid/Documents/srr/emscripten/emcc accepts -g... yes
checking for /home/samreid/Documents/srr/emscripten/emcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /home/samreid/Documents/srr/emscripten/emcc... gcc3
checking how to run the C preprocessor... /home/samreid/Documents/srr/emscripten/emcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for strings.h... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether /home/samreid/Documents/srr/emscripten/emcc and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by /home/samreid/Documents/srr/emscripten/emcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from /home/samreid/Documents/srr/emscripten/emcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /home/samreid/Documents/srr/emscripten/emcc supports -fno-rtti -fno-exceptions... yes
checking for /home/samreid/Documents/srr/emscripten/emcc option to produce PIC... -fPIC -DPIC
checking if /home/samreid/Documents/srr/emscripten/emcc PIC flag -fPIC -DPIC works... yes
checking if /home/samreid/Documents/srr/emscripten/emcc static flag -static works... yes
checking if /home/samreid/Documents/srr/emscripten/emcc supports -c -o file.o... yes
checking if /home/samreid/Documents/srr/emscripten/emcc supports -c -o file.o... (cached) yes
checking whether the /home/samreid/Documents/srr/emscripten/emcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... ERROR    root: [31mno input files
note that input files without a known suffix are ignored, make sure your input files end with one of: ('.c', '.C', '.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC', '.m', '.mm', '.bc', '.o', '.obj', '.dylib', '.so', '.dll', '.a', '.ll')[0m
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether windows code is enabled... no
checking /proc/meminfo usability... yes
checking /proc/meminfo presence... yes
checking for /proc/meminfo... yes
checking for X... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether closedir returns void... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for vprintf... yes
checking for _doprnt... no
checking if hardcoding of the X11 runtime library path is desired... no
No X display!
checking for pid_t... yes
checking return type of signal handlers... void
checking for sighandler_t... no
checking for sig_t... yes
checking for __sighandler_t... no
checking for dirent.h that defines DIR... (cached) yes
checking for library containing opendir... (cached) none required
checking for unistd.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether stat file-mode macros are broken... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/socket.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/io.h usability... yes
checking sys/io.h presence... yes
checking for sys/io.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for localtime... yes
checking for ftime... yes
checking for gettimeofday... yes
checking for time... yes
checking for getrusage... yes
checking for utimes... yes
checking for getrlimit... yes
checking for endpwent... yes
checking for gethostbyname... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strtol... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for isatty... yes
checking for tcgetattr... yes
checking for tcsetattr... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for access... yes
checking for bcopy... yes
checking for bzero... yes
checking for qsort... yes
checking for dup2... yes
checking for popen... yes
checking for strchr... yes
checking for strrchr... yes
checking for getcwd... yes
Checking mathematical features of the system:
checking for sqrt in -lm... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for erfc... yes
checking for logb... yes
checking for scalb... yes
checking for scalbn... yes
checking for asinh... yes
checking for acosh... yes
checking for atanh... yes
checking for finite... yes
checking whether isinf is declared... yes
checking whether isnan is declared... yes
checking for sigsetjmp... no
checking libiberty.h usability... no
checking libiberty.h presence... no
checking for libiberty.h... no
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for asprintf... yes
checking for dirname... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for getopt_long... yes
Settings which were chosen:
checking for bison... no
checking for byacc... no
checking for yacc... no
configure: WARNING: No bison, byacc, yacc found: Uses prebuilt default parsers
GNU readline disabled.
BSD editline disabled.
checking ncurses/termcap.h usability... no
checking ncurses/termcap.h presence... no
checking for ncurses/termcap.h... no
checking termcap.h usability... no
checking termcap.h presence... no
checking for termcap.h... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating man/Makefile
config.status: creating man/man1/Makefile
config.status: creating src/Makefile
config.status: creating src/spicelib/Makefile
config.status: creating src/spicelib/analysis/Makefile
config.status: creating src/spicelib/devices/Makefile
config.status: creating src/spicelib/devices/asrc/Makefile
config.status: creating src/spicelib/devices/bjt/Makefile
config.status: creating src/spicelib/devices/bsim1/Makefile
config.status: creating src/spicelib/devices/bsim2/Makefile
config.status: creating src/spicelib/devices/bsim3/Makefile
config.status: creating src/spicelib/devices/bsim3v0/Makefile
config.status: creating src/spicelib/devices/bsim3v1/Makefile
config.status: creating src/spicelib/devices/bsim3v32/Makefile
config.status: creating src/spicelib/devices/bsim4/Makefile
config.status: creating src/spicelib/devices/bsim4v4/Makefile
config.status: creating src/spicelib/devices/bsim4v5/Makefile
config.status: creating src/spicelib/devices/bsim4v6/Makefile
config.status: creating src/spicelib/devices/bsim3soi_pd/Makefile
config.status: creating src/spicelib/devices/bsim3soi_fd/Makefile
config.status: creating src/spicelib/devices/bsim3soi_dd/Makefile
config.status: creating src/spicelib/devices/bsimsoi/Makefile
config.status: creating src/spicelib/devices/cap/Makefile
config.status: creating src/spicelib/devices/cccs/Makefile
config.status: creating src/spicelib/devices/ccvs/Makefile
config.status: creating src/spicelib/devices/csw/Makefile
config.status: creating src/spicelib/devices/cpl/Makefile
config.status: creating src/spicelib/devices/dio/Makefile
config.status: creating src/spicelib/devices/ind/Makefile
config.status: creating src/spicelib/devices/isrc/Makefile
config.status: creating src/spicelib/devices/hfet1/Makefile
config.status: creating src/spicelib/devices/hfet2/Makefile
config.status: creating src/spicelib/devices/hisim2/Makefile
config.status: creating src/spicelib/devices/hisimhv1/Makefile
config.status: creating src/spicelib/devices/jfet/Makefile
config.status: creating src/spicelib/devices/jfet2/Makefile
config.status: creating src/spicelib/devices/ltra/Makefile
config.status: creating src/spicelib/devices/mes/Makefile
config.status: creating src/spicelib/devices/mesa/Makefile
config.status: creating src/spicelib/devices/mos1/Makefile
config.status: creating src/spicelib/devices/mos2/Makefile
config.status: creating src/spicelib/devices/mos3/Makefile
config.status: creating src/spicelib/devices/mos6/Makefile
config.status: creating src/spicelib/devices/mos9/Makefile
config.status: creating src/spicelib/devices/ndev/Makefile
config.status: creating src/spicelib/devices/res/Makefile
config.status: creating src/spicelib/devices/soi3/Makefile
config.status: creating src/spicelib/devices/sw/Makefile
config.status: creating src/spicelib/devices/tra/Makefile
config.status: creating src/spicelib/devices/txl/Makefile
config.status: creating src/spicelib/devices/urc/Makefile
config.status: creating src/spicelib/devices/vbic/Makefile
config.status: creating src/spicelib/devices/vccs/Makefile
config.status: creating src/spicelib/devices/vcvs/Makefile
config.status: creating src/spicelib/devices/vsrc/Makefile
config.status: creating src/spicelib/devices/nbjt/Makefile
config.status: creating src/spicelib/devices/nbjt2/Makefile
config.status: creating src/spicelib/devices/numd/Makefile
config.status: creating src/spicelib/devices/numd2/Makefile
config.status: creating src/spicelib/devices/numos/Makefile
config.status: creating src/spicelib/parser/Makefile
config.status: creating src/ciderlib/Makefile
config.status: creating src/ciderlib/input/Makefile
config.status: creating src/ciderlib/support/Makefile
config.status: creating src/ciderlib/oned/Makefile
config.status: creating src/ciderlib/twod/Makefile
config.status: creating src/frontend/Makefile
config.status: creating src/frontend/numparam/Makefile
config.status: creating src/frontend/help/Makefile
config.status: creating src/frontend/parser/Makefile
config.status: creating src/frontend/plotting/Makefile
config.status: creating src/frontend/trannoise/Makefile
config.status: creating src/frontend/wdisp/Makefile
config.status: creating src/include/ngspice/Makefile
config.status: creating src/maths/Makefile
config.status: creating src/maths/cmaths/Makefile
config.status: creating src/maths/fft/Makefile
config.status: creating src/maths/misc/Makefile
config.status: creating src/maths/ni/Makefile
config.status: creating src/maths/deriv/Makefile
config.status: creating src/maths/poly/Makefile
config.status: creating src/maths/sparse/Makefile
config.status: creating src/misc/Makefile
config.status: creating src/xspice/Makefile
config.status: creating src/xspice/cm/Makefile
config.status: creating src/xspice/cmpp/Makefile
config.status: creating src/xspice/icm/makedefs
config.status: creating src/xspice/icm/GNUmakefile
config.status: creating src/xspice/mif/Makefile
config.status: creating src/xspice/evt/Makefile
config.status: creating src/xspice/enh/Makefile
config.status: creating src/xspice/ipc/Makefile
config.status: creating src/xspice/idn/Makefile
config.status: creating tests/Makefile
config.status: creating tests/bsim1/Makefile
config.status: creating tests/bsim2/Makefile
config.status: creating tests/bsim3/Makefile
config.status: creating tests/bsim3/ac_sim/Makefile
config.status: creating tests/bsim3/dc_sim/Makefile
config.status: creating tests/bsim3/tran_sim/Makefile
config.status: creating tests/bsim3soidd/Makefile
config.status: creating tests/bsim3soifd/Makefile
config.status: creating tests/bsim3soipd/Makefile
config.status: creating tests/bsim4/Makefile
config.status: creating tests/bsimsoi/Makefile
config.status: creating tests/filters/Makefile
config.status: creating tests/general/Makefile
config.status: creating tests/hfet/Makefile
config.status: creating tests/hisim/Makefile
config.status: creating tests/hisimhv1/Makefile
config.status: creating tests/jfet/Makefile
config.status: creating tests/mes/Makefile
config.status: creating tests/mesa/Makefile
config.status: creating tests/mos6/Makefile
config.status: creating tests/polezero/Makefile
config.status: creating tests/sensitivity/Makefile
config.status: creating tests/transient/Makefile
config.status: creating tests/transmission/Makefile
config.status: creating tests/xspice/Makefile
config.status: creating tests/xspice/digital/Makefile
config.status: creating tests/xspice/digital/spinit
config.status: creating tests/resistance/Makefile
config.status: creating tests/vbic/Makefile
config.status: creating src/include/ngspice/config.h
config.status: executing depfiles commands
config.status: executing libtool commands

配置后,make產生:

Making all in src
make[1]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src'
Making all in misc
make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/misc'
  CC     getopt_long_bsd.lo
  CC     alloc.lo
  CC     dup2.lo
  CC     dstring.lo
  CC     hash.lo
  CC     ivars.lo
  CC     mktemp.lo
  CC     printnum.lo
  CC     string.lo
../../../src/misc/string.c:540:10: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
    for(i=i; str[i]!='\0'; i++) 
        ~^~
1 warning generated.
  CC     tilde.lo
  CC     misc_time.lo
  CC     wlist.lo
  CC     util.lo
  CCLD   libmisc.la
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/misc'
Making all in maths
make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths'
Making all in cmaths
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/cmaths'
  CC     cmath1.lo
  CC     cmath2.lo
  CC     cmath3.lo
  CC     cmath4.lo
  CCLD   libcmaths.la
  CC     test_cx_mag.o
  CCLD   test_cx_mag
  CC     test_cx_j.o
  CCLD   test_cx_j
  CC     test_cx_ph.o
  CCLD   test_cx_ph
  CC     test_cx_cph.o
  CCLD   test_cx_cph
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/cmaths'
Making all in ni
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/ni'
  CC     niaciter.lo
  CC     nicomcof.lo
  CC     niconv.lo
  CC     nidest.lo
  CC     niditer.lo
  CC     niinit.lo
  CC     niinteg.lo
  CC     niiter.lo
  CC     niniter.lo
  CC     nipred.lo
  CC     nipzmeth.lo
  CC     nireinit.lo
  CC     nisenre.lo
  CCLD   libni.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/ni'
Making all in sparse
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/sparse'
  CC     spalloc.lo
  CC     spbuild.lo
  CC     spextra.lo
  CC     spfactor.lo
  CC     spoutput.lo
  CC     spsmp.lo
  CC     spsolve.lo
  CC     sputils.lo
  CCLD   libsparse.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/sparse'
Making all in poly
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/poly'
  CC     interpolate.lo
  CC     polyfit.lo
  CC     polyderiv.lo
  CC     polyeval.lo
  CCLD   libpoly.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/poly'
Making all in deriv
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/deriv'
  CC     atander.lo
  CC     cosderiv.lo
  CC     cubeder.lo
  CC     divderiv.lo
  CC     equalder.lo
  CC     expderiv.lo
  CC     invderiv.lo
  CC     multder.lo
  CC     plusder.lo
  CC     powderiv.lo
  CC     sqrtder.lo
  CC     tanderiv.lo
  CC     timesder.lo
  CCLD   libderiv.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/deriv'
Making all in misc
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/misc'
  CC     accuracy.lo
  CC     bernoull.lo
  CC     erfc.lo
  CC     equality.lo
  CC     isinf.lo
  CC     isnan.lo
  CC     logb.lo
  CC     scalb.lo
  CC     norm.lo
  CC     randnumb.lo
  CCLD   libmathmisc.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/misc'
Making all in fft
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths/fft'
  CC     fftext.lo
  CC     fftlib.lo
  CC     matlib.lo
  CCLD   libmathfft.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths/fft'
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/maths'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths'
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/maths'
Making all in frontend
make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/frontend'
Making all in plotting
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/plotting'
  CC     plotting.lo
  CC     agraf.lo
  CC     clip.lo
  CC     gnuplot.lo
  CC     graf.lo
  CC     graphdb.lo
  CC     grid.lo
  CC     pvec.lo
  CC     plot5.lo
  CC     plotcurv.lo
  CC     plotit.lo
  CCLD   libplotting.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/plotting'
Making all in help
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/help'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/help'
Making all in parser
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/parser'
  CC     backq.lo
  CC     complete.lo
../../../../src/frontend/parser/complete.c:113:48: warning: implicit conversion changes signedness: 'int' to 'long' [-Wsign-conversion]
            if (cc && (cc->cc_kwords[arg] & (1 << j))) {
                                          ~  ~~^~~~
1 warning generated.
  CC     cshpar.lo
  CC     glob.lo
  CC     input.lo
  CC     lexical.lo
  CC     numparse.lo
  CC     std.lo
  CC     unixcom.lo
  CCLD   libparser.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/parser'
Making all in wdisp
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/wdisp'
  CC     windisp.lo
  CC     winprint.lo
  CCLD   libwindisp.la
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/frontend/wdisp'
<truncated for space>...
make[4]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib/devices/vsrc'
  CC     vsrc.lo
  CC     vsrcacct.lo
  CC     vsrcacld.lo
  CC     vsrcask.lo
  CC     vsrcdel.lo
  CC     vsrcdest.lo
  CC     vsrcfbr.lo
  CC     vsrcinit.lo
  CC     vsrcload.lo
  CC     vsrcmdel.lo
  CC     vsrcpar.lo
  CC     vsrcpzld.lo
  CC     vsrcpzs.lo
  CC     vsrcset.lo
  CC     vsrctemp.lo
  CCLD   libvsrc.la
make[4]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib/devices/vsrc'
make[4]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib/devices'
  CC     dev.lo
  CC     devsup.lo
  CC     cktaccept.lo
  CC     cktask.lo
  CC     cktbindnode.lo
  CC     cktcrte.lo
  CC     cktfinddev.lo
  CC     cktinit.lo
  CC     limit.lo
  CCLD   libdev.la
make[4]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib/devices'
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib/devices'
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib'
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/spicelib'
Making all in include/ngspice
make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/include/ngspice'
make  all-am
make[3]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src/include/ngspice'
make[3]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/include/ngspice'
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src/include/ngspice'
make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src'
  CC     ngspice-main.o
  CC     ngspice-conf.o
  CC     ngspice-ngspice.o
  CCLD   ngspice
Traceback (most recent call last):
  File "/home/samreid/Documents/srr/emscripten/emcc", line 1293, in <module>
    shared.Building.link(temp_files, specified_target)
  File "/home/samreid/Documents/srr/emscripten/tools/shared.py", line 1105, in link
    assert os.path.exists(target) and (output is None or 'Could not open input file' not in output), 'Linking error: ' + output
AssertionError: Linking error: 
make[2]: *** [ngspice] Error 1
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src'
make: *** [all-recursive] Error 1

最終錯誤是在CCLD步驟中,這是上述跟蹤的結尾:

make[2]: Entering directory `/home/samreid/Downloads/ngspice-25/release/src'
  CC     ngspice-main.o
  CC     ngspice-conf.o
  CC     ngspice-ngspice.o
  CCLD   ngspice
Traceback (most recent call last):
  File "/home/samreid/Documents/srr/emscripten/emcc", line 1293, in <module>
    shared.Building.link(temp_files, specified_target)
  File "/home/samreid/Documents/srr/emscripten/tools/shared.py", line 1105, in link
    assert os.path.exists(target) and (output is None or 'Could not open input file' not in output), 'Linking error: ' + output
AssertionError: Linking error: 
make[2]: *** [ngspice] Error 1
make[2]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/samreid/Downloads/ngspice-25/release/src'
make: *** [all-recursive] Error 1

謝謝,找出如何進行的任何幫助都將非常棒!

您可能低估了Emscripten的作用和作用。 是的,它是一個交叉編譯器,但是要通過llvm轉換源代碼,不僅要使用其他編譯器,還需要發生更多的事情。

如果查看./configure輸出,它應該已經使您感到奇怪:

checking host system type... x86_64-unknown-linux-gnu

由於Javascript僅能輕松地表示32位整數,所以此行無法工作。 因此,至少該arch配置的x86_64部分是錯誤的。

另外一行:

checking the name lister (/usr/bin/nm -B) interface... BSD nm

就像您已經知道的那樣,我們將使用LLVM,這意味着也需要替換本機二進制工具。

使用配置腳本,您必須運行:

$ ~/Documents/srr/emscripten/emconfigure ./configure

這取代了大多數工具,並且Emscripten的處理方式發生了變化。 我個人然后建議像這樣調用make:

$ ~/Documents/srr/emscripten/emmake make

雖然讓本身就應該工作,也有很多的makefile,這都寫得很糟糕,所以強制執行工具再次不能傷害。

明智的做法是完全公開,根據經驗,我建議不要使用make和autotools版本。 如果可用,請使用CMake。

移植時也要做好很多工作的准備。 這不是一個簡單的過程,需要大量的手工工作/測試以及對所有工具/步驟/源代碼的理解。

祝好運。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM