簡體   English   中英

在Kubuntu設備上執行命令

[英]Make command on Kubuntu device

我必須編譯源代碼才能獲得可執行文件。 但是,由於存在帶有以下錯誤消息的寄生蟲,make命令無法編譯:

sh: 4: Syntax error: "(" unexpected (expecting ")")
Makefile: 36: recipe for target 'dynamic' failed
make[1]: [dynamic] Error 2

我訪問了附加到此帖子的Makefile:

# get PETSC_DIR, PETSC_ARCH and MPIHOME from NEMO 5 build system
#LIBMESH_VERSION = 0.8.0
include ../../make.inc

#all: libmesh/configure static dynamic
all: libmesh/configure dynamic
# <ss 12/09/10> static stuff is only needed on jaguar

libmesh/configure:
@echo "Extracting libmesh-$(LIBMESH_VERSION).tar.gz..."
tar zxf libmesh-$(LIBMESH_VERSION).tar.gz

# <ss 17.7.2010> PETSc now is mandatory for libmesh - however, libmesh takes MPI configuration from petsc configuration files in that case.
# libmesh searches for $PETSC_DIR/include/petsc.h and needs $PETSC_ARCH to be set
# On nanohub, things got messed up and OpenMIP libraries linked to executables. to prevent this, I had to disable VTK within libmesh.
# <ss 13.8.2010> disabled tetgen because libtetgen.a seems to contain an int main() which makes static linking impossible. 
# Note: the 'make clean' before 'make all' for the contributions is mandatory, otherwise shared LASPACK will not compile.

static: libmesh/configure
@echo "###########################################"
@echo "#                                         #"
@echo "# Configuring Libmesh (STATIC libraries)  #"
@echo "#                                         #"
@echo "###########################################"
(export libmesh_CXXFLAGS=$(libmesh_CXXFLAGS) ; \
export libmesh_INCLUDE=$(libmesh_INCLUDE); \
export SLEPC_DIR=$(SLEPC_DIR); \
cd libmesh; ./configure PETSC_DIR=$(PETSC_REAL_BUILD) MPIHOME=$(MPIHOME) PETSC_ARCH=$(PETSC_REAL_ARCH) \
F77="$(MPIF77)" CC="$(MPICC)" GCC="$(GCC)" CXX="$(MPICXX)"  --enable-vtk --with-vtk-include=$(VTKINC_PATH) \
--with-vtk-lib=$(VTKLIB_PATH) --disable-tetgen --disable-tecplot \
--disable-nemesis --disable-shared --enable-parmesh  --enable-amr; \
make clean; make; \
cd contrib; make clean; make all)

dynamic: libmesh/configure
@echo "###########################################"
@echo "#                                         #"
@echo "# Configuring Libmesh (DYNAMIC libraries) #"
@echo "#                                         #"
@echo "###########################################"
(export libmesh_CXXFLAGS=$(libmesh_CXXFLAGS); \
export libmesh_CPPFLAGS=$(libmesh_CPPFLAGS); \
export libmesh_INCLUDE=$(libmesh_INCLUDE); \
export METHODS=(opt,dbg);\
export SLEPC_DIR=$(SLEPC_DIR)/build-real; \
cd libmesh; ./configure PETSC_DIR=$(PETSC_REAL_BUILD) MPIHOME=$(MPIHOME) PETSC_ARCH=$(PETSC_REAL_ARCH) \
F77="$(MPIF77)" CC="$(MPICC)" GCC="$(GCC)" CXX="$(MPICXX)" --enable-vtk  --with-vtk-include=$(VTKINC_PATH) \
--with-vtk-lib=$(VTKLIB_PATH) --disable-tetgen --enable-triangle --enable-slepc  --disable-nemesis --disable-cxx11 --disable-strict-lgpl \
--enable-parmesh --enable-amr --enable-shared=yes --disable-glibcxx-debugging ; \
make clean; make --jobs=4; \
cd contrib; make clean; make all --jobs=4;)

clean:
    cd libmesh; make clean

distclean:
    rm -rf libmesh

我認為問題出在我從其他帖子中讀取時,被迫使用bash shell。 我這樣做了,但是沒有用。 我使用Kubuntu:Ubuntu的KDE版本運行它。 非常感謝您的幫助。

檢查動態目標的第4行,因為錯誤消息指出:

export METHODS=(opt,dbg);\

應該可能是其他東西,或者(opt,dbg)部分應該用雙引號引起來:

export METHODS="(opt,dbg)";\

該項目的README.md看起來您應該使用過

../configure --with-methods="opt dbg"

(不帶括號,空格分隔),而不是(顯然) ../configure --with-methods="(opt,dbg)"

暫無
暫無

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

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