math.h not being included even when it is included in makefile - c++

I am trying to build SPRO from http://www.irisa.fr/metiss/guig/spro
They use Automake 1.6.2 to generate the makefile.
My issue is that when I am trying to make the project I am getting the error
"undefined reference to 'sin' " etc.
Here is the error image
This error is due to the fact that math library is not being included with -lm flag but -lm is present in makefile.am
Here is my makefile.am
AUTOMAKE_OPTIONS = 1.4 foreign
ACLOCAL_AMFLAGS = -I auxdir
LDADD = -lm -L. -lspro #sphere_lib#
INCLUDES = #sphere_include#
include_HEADERS = spro.h
lib_LIBRARIES = libspro.a
noinst_HEADERS = getopt.h
libspro_a_SOURCES = system.h spro.h sig.c spf.c header.c misc.c lpc.c convert.c fft.c
bin_PROGRAMS = scopy slpc slpcep sfbank sfbcep
noinst_PROGRAMS = scompare
scopy_SOURCES = scopy.c getopt.c getopt1.c
scopy_DEPENDENCIES = libspro.a
slpc_SOURCES = slpc.c getopt.c getopt1.c
slpc_DEPENDENCIES = libspro.a
slpcep_SOURCES = slpcep.c getopt.c getopt1.c
slpcep_DEPENDENCIES = libspro.a
sfbank_SOURCES = sfbank.c getopt.c getopt1.c
sfbank_DEPENDENCIES = libspro.a
sfbcep_SOURCES = sfbcep.c getopt.c getopt1.c
sfbcep_DEPENDENCIES = libspro.a
scompare_SOURCES = scompare.c getopt.c getopt1.c
scompare_DEPENDENCIES = libspro.a
SUBDIRS = doc auxdir test
EXTRA_DIST = README INSTALL COPYING CHANGES
Can anyone guide me how to fix this issue?

Change the order of the dependencies (if libA needs symbols from libB then the order should be -lA -lB). So it should be:
LDADD = -L. -lspro #sphere_lib# -lm

Related

Should I set src_uri?

I has sources in local, not archives.
How do I write a bb file if I want to build these sources?
ex ) enter code here
librarytest
- a.c
- b.c
- c.c
- librarytest.bb
- LICENSE
librarytest.bb file.
SUMMARY = "Library test source"
SECTION = "misc"
LICENSE = "GPLv2"
BB_STRICT_CHECKSUM = "0"
PREBUILTLIBS_PATH = "${TOPDIR}/../prebuiltlibs"
FILESEXTRAPATHS_prepend := "${PREBUILTLIBS_PATH}"
LIC_FILES_CHKSUM = "file://LICENSE;md5=293ef69c4e88434d37a5ee577a5288cb"
SRC_URI = "file://${PREBUILTLIBS_PATH}/${PN}"
EXTRA_OEMAKE = "-e MAKEFLAGS="
# comment out MakeInclude in Makefile which sets build environment
# ignore strip to avoid yocto errors in stripping
do_fetch[noexec] = "1"`enter code here`
do_unpack[noexec] = "1"
... skip
Here's how you can compile a shared library from the local sources. You can compile a test application in the similar way.
SUMMARY = "Library test source"
SECTION = "misc"
LICENSE = "GPLv2"
BB_STRICT_CHECKSUM = "0"
PREBUILTLIBS_PATH = "${TOPDIR}/../prebuiltlibs"
FILESEXTRAPATHS_prepend := "${PREBUILTLIBS_PATH}:${THISDIR}"
LIC_FILES_CHKSUM = "file://LICENSE;md5=293ef69c4e88434d37a5ee577a5288cb"
SRC_URI = "
file://a.c \
file://b.c \
file://c.c \
"
EXTRA_OEMAKE = "-e MAKEFLAGS="
# comment out MakeInclude in Makefile which sets build environment
# ignore strip to avoid yocto errors in stripping
do_fetch[noexec] = "1"
do_unpack ()
{
cp ${WORKDIR}/a.c ${S}
cp ${WORKDIR}/b.c ${S}
cp ${WORKDIR}/c.c ${S}
}
do_compile ()
{
# Either run makefile or the gcc shell command to compile files
# oe_runmake
${CC} a.c b.c c.c -fPIC -shared -o libraryName.so
}
do_install ()
{
install -d ${D}${libdir}
install -m 0644 libraryName.so ${D}${libdir}
}

gcc makefile compilation & syntax. How c compiler is called and multiple included paths

I am pretty new in Linux/C++ so I need your help to understad the makefile below.
So my question are
1) how c compiler is called ? I can not find any calls and
2) what is the correct syntax to declared multiple included paths in the INC_DIR directive ?
This make file is used under cygwin64 terminal and Windows 10.
# the SOURCE definiton lets move your makefile to another position
CONFIG = LIBRARY
# set pathes to the correct directories
SRC_DIR = ../../../../source/Lib/TLibCommon
INC_DIR = ../../../../source/Lib
LIB_DIR = ../../../../lib
BIN_DIR = ../../../../bin
SRC_DIR1 = ../../../../source/Lib/libmd5
SRC_DIR2 =
SRC_DIR3 =
SRC_DIR4 =
USER_INC_DIRS = -I$(SRC_DIR)
USER_LIB_DIRS =
ifeq ($(HIGHBITDEPTH), 1)
HBD=HighBitDepth
else
HBD=
endif
# intermediate directory for object files
OBJ_DIR = ./objects$(HBD)
# the library name
PRJ_NAME = TLibCommon$(HBD)
# version information
MAJOR_VER = 0
MINOR_VER = 1
VER = $(MAJOR_VER).$(MINOR_VER)
# defines to set
DEFS = -DMSYS_LINUX
# set objects
OBJS = \
$(OBJ_DIR)/Debug.o \
$(OBJ_DIR)/TComPicYuv.o \
$(OBJ_DIR)/TComYuv.o \
$(OBJ_DIR)/ContextModel.o \
$(OBJ_DIR)/ContextModel3DBuffer.o \
$(OBJ_DIR)/SEI.o \
$(OBJ_DIR)/TComCABACTables.o \
$(OBJ_DIR)/TComSampleAdaptiveOffset.o \
$(OBJ_DIR)/TComBitStream.o \
$(OBJ_DIR)/TComChromaFormat.o \
$(OBJ_DIR)/TComDataCU.o \
$(OBJ_DIR)/TComLoopFilter.o \
$(OBJ_DIR)/TComMotionInfo.o \
$(OBJ_DIR)/TComPattern.o \
$(OBJ_DIR)/TComPic.o \
$(OBJ_DIR)/TComPicSym.o \
$(OBJ_DIR)/TComPicYuvMD5.o \
$(OBJ_DIR)/TComPrediction.o \
$(OBJ_DIR)/TComRdCost.o \
$(OBJ_DIR)/TComRom.o \
$(OBJ_DIR)/TComSlice.o \
$(OBJ_DIR)/TComTrQuant.o \
$(OBJ_DIR)/TComTU.o \
$(OBJ_DIR)/TComInterpolationFilter.o \
$(OBJ_DIR)/libmd5.o \
$(OBJ_DIR)/TComWeightPrediction.o \
$(OBJ_DIR)/TComRdCostWeightPrediction.o \
LIBS = -lpthread
DEBUG_LIBS =
RELEASE_LIBS =
STAT_LIBS =
DYN_LIBS = -ldl
# the libraries to link with
STAT_DEBUG_LIBS =
STAT_RELEASE_LIBS =
DYN_DEBUG_LIBS =
DYN_RELEASE_LIBS =
# name of the base makefile
MAKE_FILE_NAME = ../../common/makefile.base
# include the base makefile
include $(MAKE_FILE_NAME)
The C compiler is likely in the CC variable set in some other makefile, presumably ../../common/makefile.base, (otherwise the default, cc, will be used).
INC_DIR does not look like a place you would add additional C include search path entries. This place looks more appropriate:
USER_INC_DIRS = -I$(SRC_DIR)
Here, you would have to add additional directories with an -I prefix, like this:
USER_INC_DIRS = -I$(SRC_DIR) -I/opt/enyo/include

How to link a static library using WAF?

I'm using OpenSSL in my C++ program, and I need to link crypto and ssl with it. If it were for example gcc, I would just pass:
-lcrypto -lssl
I am adding this dependency in Network-Simulator 3.
But I don't know how to do this in WAF. How should I add them as a dependency?
First you need to check in configure if the library is available, then you can build it.
def configure(cnf):
# other parameters omitted for brevity
cnf.check(lib=["crypto", "ssl"])
def build(bld):
# other parameters omitted for brevity
bld(use=["crypto", "ssl"])
You could also use the uselib_store parameter if you don't want to repeat the libraries:
cnf.check(lib=["crypto", "ssl"], uselib_store=["libs"])
bld(use=["libs"])
I tried adding CRYPTOPP instead of Crypto because I could do the same work with CRYPTOPP.
This is how it worked for me.
The below code needs to be added/edited in wscript found in ns-3.xx directory.
def configure(conf):
#other parameters removed
env = conf.env
conf.env['cryptopp'] = conf.check(mandatory=True, lib='cryptopp', uselib_store='CRYPTOPP')
conf.env['sph'] = conf.check(mandatory=True, lib='sph', uselib_store='SPH')
conf.env.append_value('CXXDEFINES', 'ENABLE_CRYPTOPP')
conf.env.append_value('CCDEFINES', 'ENABLE_CRYPTOPP')
conf.env['lssl'] = conf.check(mandatory=True, lib='ssl', uselib_store='OPENSSL')
conf.env.append_value('CXXDEFINES', 'ENABLE_SSL')
conf.env.append_value('CCDEFINES', 'ENABLE_SSL')
.....
def create_ns3_program(bld, name, dependencies=('core',)):
program = bld(features='cxx cxxprogram')
#other parameters removed
program.use = program.ns3_module_dependencies
if program.env['ENABLE_STATIC_NS3']:
if sys.platform == 'darwin':
program.env.STLIB_MARKER = '-Wl,-all_load,-lcryptopp,-lsph'
else:
program.env.STLIB_MARKER = '-Wl,-Bstatic,--whole-archive,-lcryptopp,-lsph'
program.env.SHLIB_MARKER = '-Wl,-Bdynamic,--no-whole-archive,-lcryptopp,-lsph'
else:
if program.env.DEST_BINFMT == 'elf':
# All ELF platforms are impacted but only the gcc compiler has a flag to fix it.
if 'gcc' in (program.env.CXX_NAME, program.env.CC_NAME):
program.env.append_value ('SHLIB_MARKER', '-Wl,--no-as-needed,-lcryptopp,-lsph')
return program
.......
def add_scratch_programs(bld):
all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']]
try:
for filename in os.listdir("scratch"):
if filename.startswith('.') or filename == 'CVS':
continue
if os.path.isdir(os.path.join("scratch", filename)):
obj = bld.create_ns3_program(filename, all_modules)
obj.path = obj.path.find_dir('scratch').find_dir(filename)
obj.source = obj.path.ant_glob('*.cc')
obj.target = filename
obj.name = obj.target
obj.install_path = None
#Add the below paramters
obj.uselib = 'CRYPTOPP'
obj.uselib = 'SPH'
obj.uselib = 'OPENSSL'
elif filename.endswith(".cc"):
name = filename[:-len(".cc")]
obj = bld.create_ns3_program(name, all_modules)
obj.path = obj.path.find_dir('scratch')
obj.source = filename
obj.target = name
obj.name = obj.target
obj.install_path = None
#Add the below paramters
obj.uselib = 'CRYPTOPP'
obj.uselib = 'SPH'
obj.uselib = 'OPENSSL'
except OSError:
return
This basically adds all paramters at runtime to the simulator you are running from scratch.
PS: This script is specific to ns-3.

Redmine3.3.0-1 Bundle install server 500 Error

I installed BITNAMI RedMine 3.3.0-1. After installing version Plugins, 500 error appears on the server.
I could not solve this.
I did everything until bundle install, but I get an error.
[enter image description here][1]
Web application could not be started
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:
Is this app supposed to be run as the daemon user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
-------- The exception is as follows: -------
Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:92:in `block in materialize'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `map!'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `materialize'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/definition.rb:140:in `specs'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/definition.rb:185:in `specs_for'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/definition.rb:174:in `requested_specs'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/environment.rb:18:in `requested_specs'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:13:in `setup'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler.rb:127:in `setup'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/setup.rb:18:in `<top (required)>'
/opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:278:in `block in run_load_path_setup_code'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:381:in `running_bundler'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:99:in `preload_app'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:157:in `<module:App>'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:28:in `<main>'
Error ID
a0d9ba99
Application root
/opt/redmine-3.3.0-1/apps/redmine/htdocs/
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
production
Ruby interpreter command
/opt/redmine-3.3.0-1/ruby/bin/ruby
User and groups
uid=2(daemon) gid=2(daemon) groups=2(daemon),1(bin),4(adm),7(lp) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Environment variables
ORBIT_SOCKETDIR = /tmp/orbit-ialab
LDAPCONF = /opt/redmine-3.3.0-1/common/etc/openldap/ldap.conf
LDFLAGS = -L/opt/redmine-3.3.0-1/common/lib -L/opt/redmine-3.3.0-1/common/lib
HOSTNAME = ialab
IMSETTINGS_INTEGRATE_DESKTOP = yes
GIO_LAUNCHED_DESKTOP_FILE_PID = 27488
SSL_CERT_FILE = /opt/redmine-3.3.0-1/common/openssl/certs/curl-ca-bundle.crt
GEM_HOME = /opt/redmine-3.3.0-1/apps/redmine/htdocs/vendor/bundle/ruby/2.1.0
SHELL = /sbin/nologin
TERM = xterm
DESKTOP_STARTUP_ID =
XDG_SESSION_COOKIE = e33f5a39112e173914eed31100000010-1495711078.860427-1274300290
HISTSIZE = 1000
CURL_CA_BUNDLE = /opt/redmine-3.3.0-1/common/openssl/certs/curl-ca-bundle.crt
PERL5LIB = /opt/redmine-3.3.0-1/git/lib/site_perl/5.16.3:/opt/redmine-3.3.0-1/perl/lib/5.16.3:/opt/redmine-3.3.0-1/perl/lib/site_perl/5.16.3:/opt/redmine-3.3.0-1/perl/lib/5.16.3/x86_64-linux-thread-multi:/opt/redmine-3.3.0-1/perl/lib/site_perl/5.16.3/x86_64-linux-thread-multi
MAGICK_CONFIGURE_PATH = /opt/redmine-3.3.0-1/common/lib/ImageMagick-6.7.5/config:/opt/redmine-3.3.0-1/common/
PYTHONUNBUFFERED = 1
GTK_RC_FILES = /etc/gtk/gtkrc:/home/ialab/.gtkrc-1.2-gnome2
GS_LIB = /opt/redmine-3.3.0-1/common/share/ghostscript/fonts
WINDOWID = 52472147
LC_NUMERIC = C
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXekPYAD
QTDIR = /usr/lib64/qt-3.3
QTINC = /usr/lib64/qt-3.3/include
GIT_SSL_CAINFO = /opt/redmine-3.3.0-1/common/openssl/certs/curl-ca-bundle.crt
OPENSSL_ENGINES = /opt/redmine-3.3.0-1/common/lib/engines
IMSETTINGS_MODULE = none
USER = daemon
MAGICK_CODER_MODULE_PATH = /opt/redmine-3.3.0-1/common/lib/ImageMagick-6.7.5/modules-Q16/coders
LS_COLORS = rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
LD_LIBRARY_PATH = /opt/redmine-3.3.0-1/subversion/lib:/opt/redmine-3.3.0-1/sqlite/lib:/opt/redmine-3.3.0-1/mysql/lib:/opt/redmine-3.3.0-1/apache2/lib:/opt/redmine-3.3.0-1/common/lib:/opt/redmine-3.3.0-1/subversion/lib:/opt/redmine-3.3.0-1/sqlite/lib:/opt/redmine-3.3.0-1/mysql/lib:/opt/redmine-3.3.0-1/apache2/lib:/opt/redmine-3.3.0-1/common/lib:/opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib:/opt/redmine-3.3.0-1/perl/lib:/opt/redmine-3.3.0-1/perl/lib/5.16.3/x86_64-linux-thread-multi/CORE:/opt/redmine-3.3.0-1/git/lib:/opt/redmine-3.3.0-1/sqlite/lib:/opt/redmine-3.3.0-1/ruby/lib:/opt/redmine-3.3.0-1/subversion/lib:/opt/redmine-3.3.0-1/postgresql/lib:/opt/redmine-3.3.0-1/mysql/lib:/opt/redmine-3.3.0-1/apache2/lib:/opt/redmine-3.3.0-1/common/lib:
SSH_AUTH_SOCK = /tmp/keyring-xETGIW/socket.ssh
GNOME_KEYRING_SOCKET = /tmp/keyring-xETGIW/socket
RAILS_RELATIVE_URL_ROOT = /redmine
IN_PASSENGER = 1
SESSION_MANAGER = local/unix:#/tmp/.ICE-unix/2901,unix/unix:/tmp/.ICE-unix/2901
USERNAME = ialab
CXXFLAGS = -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include
RACK_ENV = production
SCRIPT_URI = http://127.0.0.1:3000/redmine
GIO_LAUNCHED_DESKTOP_FILE = /usr/share/applications/gnome-terminal.desktop
PASSENGER_USE_FEEDBACK_FD = true
DESKTOP_SESSION = gnome
MAIL = /var/spool/mail/ialab
PATH = /opt/redmine-3.3.0-1/perl/bin:/opt/redmine-3.3.0-1/git/bin:/opt/redmine-3.3.0-1/sqlite/bin:/opt/redmine-3.3.0-1/ruby/bin:/opt/redmine-3.3.0-1/subversion/bin:/opt/redmine-3.3.0-1/postgresql/bin:/opt/redmine-3.3.0-1/php/bin:/opt/redmine-3.3.0-1/mysql/bin:/opt/redmine-3.3.0-1/apache2/bin:/opt/redmine-3.3.0-1/common/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ialab/bin
WSGI_ENV = production
SCRIPT_URL = /redmine
QT_IM_MODULE = xim
= /opt/redmine-3.3.0-1/manager-linux-x64.run
PWD = /opt/redmine-3.3.0-1/apps/redmine/htdocs
XMODIFIERS = #im=none
PHP_PATH = /opt/redmine-3.3.0-1/php/bin/php
GDM_KEYBOARD_LAYOUT = us
LANG = en_US.UTF-8
GNOME_KEYRING_PID = 2891
GDM_LANG = en_US.UTF-8
SASL_PATH = /opt/redmine-3.3.0-1/common/lib/sasl2
NODE_PATH = /opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/node_lib
NODE_ENV = production
GIT_TEMPLATE_DIR = /opt/redmine-3.3.0-1/git/share/git-core/templates
GDMSESSION = gnome
MAGICK_HOME = /opt/redmine-3.3.0-1/common
RUBY_HOME = /opt/redmine-3.3.0-1/ruby
HISTCONTROL = ignoredups
SSH_ASKPASS = /usr/libexec/openssh/gnome-ssh-askpass
SASL_CONF_PATH = /opt/redmine-3.3.0-1/common/etc
SHLVL = 7
HOME = /sbin
TERMINFO = /opt/redmine-3.3.0-1/common/share/terminfo
RAILS_ENV = production
OPENSSL_CONF = /opt/redmine-3.3.0-1/common/openssl/openssl.cnf
GNOME_DESKTOP_SESSION_ID = this-is-deprecated
CFLAGS = -I/opt/redmine-3.3.0-1/common/include/ImageMagick -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include/ImageMagick -I/opt/redmine-3.3.0-1/common/include
SERVER_SOFTWARE = Apache/2.4.20 (Unix) OpenSSL/1.0.2h SVN/1.8.16 PHP/5.6.23 Phusion_Passenger/5.0.6
LOGNAME = daemon
CVS_RSH = ssh
QTLIB = /usr/lib64/qt-3.3/lib
DBUS_SESSION_BUS_ADDRESS = unix:abstract=/tmp/dbus-tfHoZxB28Y,guid=fa282f9e81d15bbf69932f460000004a
GEM_PATH =
LESSOPEN = ||/usr/bin/lesspipe.sh %s
PKG_CONFIG_PATH = /opt/redmine-3.3.0-1/common/lib/pkgconfig
PASSENGER_APP_ENV = production
GITPERLLIB = /opt/redmine-3.3.0-1/git/lib/site_perl/5.16.3
DISABLE_BANNER = YES
WINDOWPATH = 1
DISPLAY = :0.0
RUBYLIB = /opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby/2.1.0:/opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux:/opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby/:/opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby/2.1.0:/opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby/2.1.0/x86_64-linux:/opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby/:/opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0:/opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/x86_64-linux:/opt/redmine-3.3.0-1/ruby/lib/ruby/:/opt/redmine-3.3.0-1/ruby/lib
BUNDLE_CONFIG = /opt/redmine-3.3.0-1/ruby/.bundler/config
G_BROKEN_FILENAMES = 1
GIT_EXEC_PATH = /opt/redmine-3.3.0-1/git/libexec/git-core/
XAUTHORITY = /root/.xauthFoxH5y
COLORTERM = gnome-terminal
_ORIGINAL_GEM_PATH = /opt/redmine-3.3.0-1/ruby/lib/ruby/gems/2.1.0
Ulimits
Unknown
System metrics
------------- General -------------
Kernel version : 2.6.32-573.el6.x86_64
Uptime : 33d 22h 4m 18s
Load averages : 0.99%, 0.80%, 0.82%
Fork rate : unknown
------------- CPU -------------
Number of CPUs : 4
Average CPU usage : 0% -- 0% user, 0% nice, 0% system, 100% idle
CPU 1 : 0% -- 0% user, 0% nice, 0% system, 100% idle
CPU 2 : 0% -- 0% user, 0% nice, 0% system, 100% idle
CPU 3 : 0% -- 0% user, 0% nice, 0% system, 100% idle
CPU 4 : 0% -- 0% user, 0% nice, 0% system, 100% idle
I/O pressure : 0%
CPU 1 : 0%
CPU 2 : 0%
CPU 3 : 0%
CPU 4 : 0%
Interference from other VMs: 0%
CPU 1 : 0%
CPU 2 : 0%
CPU 3 : 0%
CPU 4 : 0%
------------- Memory -------------
RAM total : 7748 MB
RAM used : 2526 MB (33%)
RAM free : 5221 MB
Swap total : 7887 MB
Swap used : 17 MB (0%)
Swap free : 7870 MB
Swap in : unknown
Swap out : unknown
General Ruby interpreter information
RUBY_VERSION = 2.1.9
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 2.2.5
RubyGems paths = ["/opt/redmine-3.3.0-1/apps/redmine/htdocs/vendor/bundle/ruby/2.1.0"]
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 2
MINOR = 1
TEENY = 0
PATCHLEVEL = 490
INSTALL = /usr/bin/install -c
EXEEXT =
prefix = /opt/redmine-3.3.0-1/ruby
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby-2.1.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorarchhdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0/vendor_ruby/x86_64-linux
sitearchhdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0/site_ruby/x86_64-linux
rubyarchhdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0/x86_64-linux
vendorhdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0/vendor_ruby
sitehdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0/site_ruby
rubyhdrdir = /opt/redmine-3.3.0-1/ruby/include/ruby-2.1.0
RUBY_SEARCH_PATH =
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args = '--prefix=/opt/redmine-3.3.0-1/ruby' '--with-openssl-dir=/opt/redmine-3.3.0-1/common' '--enable-pthread' '--disable-install-doc' '--with-readline-dir=/opt/redmine-3.3.0-1/common' 'CC=gcc' 'CFLAGS=-fPIC -I/opt/redmine-3.3.0-1/common/include -fPIC -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include -fPIC -m64 -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -O3' 'LDFLAGS=-L/opt/redmine-3.3.0-1/common/lib -L/opt/redmine-3.3.0-1/common/lib -L/bitnami/rubystack-linux-x64/output/sqlite/lib -L/opt/redmine-3.3.0-1/common/lib -L/bitnami/rubystack-linux-x64/output/ImageMagick/lib -L/bitnami/rubystack-linux-x64/output/ImageMagick/lib' 'CPPFLAGS=-DAI_ADDRCONFIG=0 -I/bitnami/rubystack-linux-x64/output/sqlite/include -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include/sasl -I/opt/redmine-3.3.0-1/common/include'
vendorarchdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby/2.1.0/x86_64-linux
vendorlibdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby/2.1.0
vendordir = /opt/redmine-3.3.0-1/ruby/lib/ruby/vendor_ruby
sitearchdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux
sitelibdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby/2.1.0
sitedir = /opt/redmine-3.3.0-1/ruby/lib/ruby/site_ruby
rubyarchdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/x86_64-linux
rubylibdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0
ruby_version = 2.1.0
sitearch = x86_64-linux
arch = x86_64-linux
sitearchincludedir = /opt/redmine-3.3.0-1/ruby/include/x86_64-linux
archincludedir = /opt/redmine-3.3.0-1/ruby/include/x86_64-linux
sitearchlibdir = /opt/redmine-3.3.0-1/ruby/lib/x86_64-linux
archlibdir = /opt/redmine-3.3.0-1/ruby/lib/x86_64-linux
libdirname = libdir
RUBY_EXEC_PREFIX = /opt/redmine-3.3.0-1/ruby
RUBY_LIB_VERSION =
RUBY_LIB_VERSION_STYLE = 3 /* full */
RI_BASE_NAME = ri
ridir = /opt/redmine-3.3.0-1/ruby/share/ri
rubysitearchprefix = /opt/redmine-3.3.0-1/ruby/lib/ruby/x86_64-linux
rubyarchprefix = /opt/redmine-3.3.0-1/ruby/lib/ruby/x86_64-linux
MAKEFILES = Makefile GNUmakefile
PLATFORM_DIR =
THREAD_MODEL = pthread
SYMBOL_PREFIX =
EXPORT_PREFIX =
COMMON_HEADERS =
COMMON_MACROS =
COMMON_LIBS =
MAINLIBS =
ENABLE_SHARED = no
DLDLIBS = -lc
SOLIBS = -lgmp
LIBRUBYARG_SHARED = -Wl,-R -Wl,/opt/redmine-3.3.0-1/ruby/lib -L/opt/redmine-3.3.0-1/ruby/lib
LIBRUBYARG_STATIC = -Wl,-R -Wl,/opt/redmine-3.3.0-1/ruby/lib -L/opt/redmine-3.3.0-1/ruby/lib -lruby-static
LIBRUBYARG = -Wl,-R -Wl,/opt/redmine-3.3.0-1/ruby/lib -L/opt/redmine-3.3.0-1/ruby/lib -lruby-static
LIBRUBY = libruby-static.a
LIBRUBY_ALIASES = libruby.so
LIBRUBY_SO = libruby.so.2.1.0
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
EXTDLDFLAGS =
EXTLDFLAGS =
strict_warnflags = -std=iso9899:1999
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
debugflags = -ggdb3
optflags = -O3 -fno-fast-math
cxxflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cppflags =
NULLCMD = :
DLNOBJ = dln.o
INSTALLDOC = nodoc
CAPITARGET = nodoc
RDOCTARGET = nodoc
DTRACE_GLOMMED_OBJ =
DTRACE_OBJ =
DTRACE_EXT = dmyh
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = no
EXTOUT = .ext
RUNRUBY_COMMAND = $(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=.ext $(RUNRUBYOPT)
PREP = miniruby
BTESTRUBY = $(MINIRUBY)
CROSS_COMPILING = no
TEST_RUNNABLE = yes
rubylibprefix = /opt/redmine-3.3.0-1/ruby/lib/ruby
setup = Setup
EXTSTATIC =
STRIP = strip -S -x
TRY_LINK =
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG = -Wl,-R%1$-s
LIBPATHFLAG = -L%1$-s
LINK_SO =
LIBEXT = a
DLEXT2 =
DLEXT = so
LDSHAREDXX = g++ -shared
LDSHARED = gcc -shared
CCDLFLAGS = -fPIC
STATIC =
ARCH_FLAG = -m64
DLDFLAGS =
ALLOCA =
codesign =
POSTLINK = :
WERRORFLAG = -Werror
CHDIR = cd -P
RMALL = rm -fr
RMDIRS = rmdir --ignore-fail-on-non-empty -p
RMDIR = rmdir --ignore-fail-on-non-empty
CP = cp
RM = rm -f
PKG_CONFIG = pkg-config
PYTHON = /bitnami/rubystack-linux-x64/output/python/bin/python
DOXYGEN =
DOT =
DTRACE =
MAKEDIRS = /bin/mkdir -p
MKDIR_P = /bin/mkdir -p
INSTALL_DATA = /usr/bin/install -c -m 644
INSTALL_SCRIPT = /usr/bin/install -c
INSTALL_PROGRAM = /usr/bin/install -c
SET_MAKE =
LN_S = ln -s
NM = nm
DLLWRAP =
WINDRES =
OBJCOPY = :
OBJDUMP = objdump
ASFLAGS =
AS = as
AR = ar
RANLIB = ranlib
try_header =
CC_VERSION = gcc -v
COUTFLAG = -o
OUTFLAG = -o
CPPOUTFILE = -o conftest.i
GNU_LD = yes
LD = ld
GCC = yes
EGREP = /bin/grep -E
GREP = /bin/grep
CPP = gcc -E
CXXFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
CXX = g++
OBJEXT = o
CPPFLAGS = -DAI_ADDRCONFIG=0 -I/bitnami/rubystack-linux-x64/output/sqlite/include -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include/sasl -I/opt/redmine-3.3.0-1/common/include
LDFLAGS = -L. -L/opt/redmine-3.3.0-1/common/lib -L/opt/redmine-3.3.0-1/common/lib -L/bitnami/rubystack-linux-x64/output/sqlite/lib -L/opt/redmine-3.3.0-1/common/lib -L/bitnami/rubystack-linux-x64/output/ImageMagick/lib -L/bitnami/rubystack-linux-x64/output/ImageMagick/lib -fstack-protector -rdynamic -Wl,-export-dynamic
CFLAGS = -fPIC -I/opt/redmine-3.3.0-1/common/include -fPIC -I/opt/redmine-3.3.0-1/common/include -I/opt/redmine-3.3.0-1/common/include -fPIC -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -I/bitnami/rubystack-linux-x64/output/ImageMagick/include/ImageMagick -O3
CC = gcc
NACL_SDK_VARIANT =
NACL_SDK_ROOT =
NACL_TOOLCHAIN =
target_os = linux
target_vendor = pc
target_cpu = x86_64
target = x86_64-pc-linux-gnu
host_os = linux-gnu
host_vendor = pc
host_cpu = x86_64
host = x86_64-pc-linux-gnu
RUBY_VERSION_NAME = ruby-2.1.0
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = pc
build_cpu = x86_64
build = x86_64-pc-linux-gnu
RUBY_RELEASE_DATE = 2016-03-30
RUBY_PROGRAM_VERSION = 2.1.9
target_alias =
host_alias =
build_alias =
LIBS = -lpthread -lrt -lgmp -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
mandir = /opt/redmine-3.3.0-1/ruby/share/man
localedir = /opt/redmine-3.3.0-1/ruby/share/locale
libdir = /opt/redmine-3.3.0-1/ruby/lib
psdir = /opt/redmine-3.3.0-1/ruby/share/doc/ruby
pdfdir = /opt/redmine-3.3.0-1/ruby/share/doc/ruby
dvidir = /opt/redmine-3.3.0-1/ruby/share/doc/ruby
htmldir = /opt/redmine-3.3.0-1/ruby/share/doc/ruby
infodir = /opt/redmine-3.3.0-1/ruby/share/info
docdir = /opt/redmine-3.3.0-1/ruby/share/doc/ruby
oldincludedir = /usr/include
includedir = /opt/redmine-3.3.0-1/ruby/include
localstatedir = /opt/redmine-3.3.0-1/ruby/var
sharedstatedir = /opt/redmine-3.3.0-1/ruby/com
sysconfdir = /opt/redmine-3.3.0-1/ruby/etc
datadir = /opt/redmine-3.3.0-1/ruby/share
datarootdir = /opt/redmine-3.3.0-1/ruby/share
libexecdir = /opt/redmine-3.3.0-1/ruby/libexec
sbindir = /opt/redmine-3.3.0-1/ruby/sbin
bindir = /opt/redmine-3.3.0-1/ruby/bin
exec_prefix = /opt/redmine-3.3.0-1/ruby
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/sh
archdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/x86_64-linux
topdir = /opt/redmine-3.3.0-1/ruby/lib/ruby/2.1.0/x86_64-linux
Activated Ruby gems
bundler => 1.10.4
io-console => 0.4.3
psych => 2.0.5
Hi Bitnami Engineer here,
in case you are installing a new plugin, you need to follow the next steps:
Check that the plugin is compatible with your Redmine version.
Load the Bitnami environment
https://docs.bitnami.com/installer/components/bnconsole/
If the plugin requires a migration, run the following commands to upgrade your database. It is advisable to back up the database before running these commands.
cd installdir/apps/redmine/htdocs
bundle install --without development test postgresql sqlite
ruby bin/rake redmine:plugins RAILS_ENV=production
Restart Redmine
After copying the plugin into the installdir/apps/redmine/htdocs/plugins directory, run these commands:
cd installdir/apps/redmine/htdocs
bundle install --without development test postgresql sqlite --no-deployment
bundle install --without development test postgresql sqlite --deployment
ruby bin/rake redmine:plugins RAILS_ENV=production
Restart Redmine
I hope it helps.
Jota
Problem is related with your gem files. PLease check your gemfile's versions.
View the below link to get the installation steps for bitnami-Redmine,
Steps to install bitnami redmine

how to build c++ project with scons 2.3 visual express 2012?

I try:
env = Environment(ENV = {'PATH' : os.environ['PATH'], \
'INCLUDE' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include\\', \
'LIB' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\lib\\'})
but it not working.
error message:
"cl" is not command ...
I found description in scons wiki(http://www.scons.org/wiki/PlatformSpecificNotes#Visual_C.2B-.2B-):
If using Microsoft Visual C++, you need to set 'INCLUDE', 'LIB' and 'PATH' in your environment, then import them when you create your 'Environment' object. These will be used to locate the MSVC++ tools and set 'CPPFLAGS' etc.
What am I doing wrong?
complete sconstruct(it works on ubuntu, and on windows with mingw):
import os
import sys
if ARGUMENTS.get('ndk', 0):
current_dir = os.getcwd()#os.path.dirname(os.path.abspath(__file__))
os.environ["NDK_PROJECT_PATH"] = current_dir + '/android-project'
os.system("ndk-build") # use V=1 if can't compile for android
exit(0)
if ARGUMENTS.get('ant', 0):
current_dir = os.getcwd()#os.path.dirname(os.path.abspath(__file__))
android_prj_path = current_dir + '/android-project'
os.chdir(android_prj_path)
os.system("ant debug") # use V=1 if can't compile for android
exit(0)
VariantDir('obj', 'src', duplicate = 0)
if sys.platform == 'win32':
if ARGUMENTS.get('msvc', 0) == "1":
env = Environment(ENV = {'PATH' : os.environ['PATH'], \
'INCLUDE' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include\\', \
'LIB' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\lib\\'})
else:
env = Environment(tools = ['mingw'])
env.Append(CCFLAGS = '-U__STRICT_ANSI__') # for boost::program_options on mingw 4.7
env.Append(LINKFLAGS = '-mwindows')
env.Append(LIBS = ['mingw32', 'SDL2', 'SDL2main', 'm', 'user32', 'gdi32', \
'winmm', 'imm32', 'ole32', 'oleaut32', 'version', \
'uuid', 'glew32', 'opengl32'])
else:
env = Environment()
env.Append(CCFLAGS = '-rdynamic')
env.Append(LIBS = ['SDL2', 'pthread', 'm', 'dl', 'GL'])
env.Append(CCFLAGS = '-fno-strict-aliasing') # for angelscript compile see doc
cur_dir = os.getcwd()
env.Append(CCFLAGS = '-I ' + cur_dir) # for boost find in include path
env.Append(CCFLAGS = '-g -std=c++0x -Wall -Wfatal-errors') #-msse2 -pg
env.Append(LINKFLAGS=[]) # -pg
src = Glob('obj/*.cpp')
src += Glob('obj/scene2d/*.cpp')
src += Glob('obj/pugixml/*.cpp')
src += Glob('obj/debug_support/*.cpp')
src += Glob('obj/angelscript/*.cpp')
src += Glob('obj/scriptarray/*.cpp')
src += Glob('obj/scriptstdstring/*.cpp')
src += Glob('obj/scriptbuilder/*.cpp')
src += Glob('obj/boost_libs_src/program_options/src/*.cpp')
src += Glob('obj/boost_libs_src/smart_ptr/src/*.cpp')
src += Glob('obj/boost_libs_src/system/src/*.cpp')
src += Glob('obj/boost_libs_src/filesystem/src/*.cpp')
src += Glob('obj/libwebp/*/*.c')
src += Glob('obj/zlib/*.c')
src += Glob('obj/libpng/*.c')
env.Program(target = 'start', source = src)
Best way to use scons and MSVC is:
env = Environment( MSVC_USE_SCRIPT = "c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\bin\\vcvars32.bat")
Full script that works for me
import os
import sys
current_dir = os.getcwd()#os.path.dirname(os.path.abspath(__file__))
if ARGUMENTS.get('ndk', 0):
os.environ["NDK_PROJECT_PATH"] = current_dir + '/android-project'
os.system("ndk-build") # use V=1 if can't compile for android
Exit(0)
if ARGUMENTS.get('ant', 0):
android_prj_path = current_dir + '/android-project'
os.chdir(android_prj_path)
os.system("ant debug") # use V=1 if can't compile for android
Exit(0)
VariantDir('obj', 'src', duplicate = 0)
if sys.platform == 'win32':
if ARGUMENTS.get('msvc', 0) == "1":
#os.system('"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\bin\\vcvars32"')
env = Environment(ENV = {'PATH' : os.environ['PATH'], \
'INCLUDE' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Include\um\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Include\\shared\\', \
'LIB' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\lib\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Lib\\win8\\um\\x86\\'})
env.Append(CCFLAGS = '-I ' + current_dir + '/dep/msvc/include') # for SDL2 on windows
env.Append(CCFLAGS = '/Od /EHsc -DBOOST_ALL_NO_LIB')
env.Append(LINKFLAGS = '/LIBPATH:' + current_dir + '/dep/msvc/lib/')
env.Append(LINKFLAGS = '/SUBSYSTEM:WINDOWS')
env.Append(LIBS = ['user32', 'gdi32', \
'winmm', 'imm32', 'ole32', 'oleaut32', 'version', \
'uuid', 'glew32s', 'opengl32'])
else:
env = Environment(tools = ['mingw'])
env.Append(CCFLAGS = '-U__STRICT_ANSI__') # for boost::program_options on mingw 4.7
env.Append(LINKFLAGS = '-mwindows')
env.Append(LIBS = ['mingw32', 'SDL2', 'SDL2main', 'm', 'user32', 'gdi32', \
'winmm', 'imm32', 'ole32', 'oleaut32', 'version', \
'uuid', 'glew32', 'opengl32'])
else:
env = Environment()
env.Append(LIBS = ['SDL2', 'pthread', 'm', 'dl', 'GL'])
if ARGUMENTS.get('msvc', 0) != "1":
env.Append(CCFLAGS = '-fno-strict-aliasing') # for angelscript compile see doc
env.Append(CCFLAGS = '-std=c++0x -Wall -Wfatal-errors')
env.Append(CCFLAGS = '-I ' + current_dir) # for boost find in include path
if ARGUMENTS.get('release', 0) == "1":
if sys.platform != 'win32':
env.Append(CCFLAGS = '-DNO_OPENGL_CHECK -DSDL_ASSERT_LEVEL=1 -O2 -msse2') #-DNO_OPENGL_CHECK -DSDL_ASSERT_LEVEL=1 -O3 -msse2
else:
env.Append(CCFLAGS = '/MD')
env.Append(LIBS = ['SDLmain', 'SDL', 'msvcrt'])
else:
if sys.platform != 'win32':
env.Append(LINKFLAGS=['-rdynamic']) # $(sdl2-config --static-libs)
env.Append(CCFLAGS = '-g')
else:
env.Append(CCFLAGS = '/MDd /Gm- /Zi -D_DEBUG /Od ')
env.Append(LINKFLAGS=['/INCREMENTAL'])
env['PDB'] = ['start.pdb']
env['CCPDBFLAGS'] = ['${(PDB and "/Zi /Fd%s" % File(PDB)) or ""}']
env.Append(LIBS = ['SDLmain_d', 'SDL_d', 'MSVCRTD', 'libcmt'])
src = Glob('obj/*.cpp')
src += Glob('obj/scene2d/*.cpp')
src += Glob('obj/pugixml/*.cpp')
src += Glob('obj/debug_support/*.cpp')
src += Glob('obj/angelscript/*.cpp')
src += Glob('obj/scriptarray/*.cpp')
src += Glob('obj/scriptstdstring/*.cpp')
src += Glob('obj/scriptbuilder/*.cpp')
src += Glob('obj/scripthelper/*.cpp')
src += Glob('obj/boost_libs_src/program_options/src/*.cpp')
src += Glob('obj/boost_libs_src/smart_ptr/src/*.cpp')
src += Glob('obj/boost_libs_src/system/src/*.cpp')
src += Glob('obj/boost_libs_src/filesystem/src/*.cpp')
src += Glob('obj/libwebp/*/*.c')
src += Glob('obj/zlib/*.c')
src += Glob('obj/libpng/*.c')
prog = env.Program(target = 'start', source = src)