embedthis/appweb-4 — Issue #1: AppWeb Fails to Detect Module Shared Object Files
Author: Wilkins-
Created: 2011-12-01 16:17:09+00:00
State: open

Operating System: Ubuntu 11.10

Please note that ejs-2 and appweb-4 are cloned into the same directory and the script is executed in the root of this directory.

Build Script:
cd ejs-2
./configure
make
cd ..
cd appweb-4
cd out
chmod 777 bin
cd bin
chmod 777 appweb
cd ../..
./configure --with-ejs=../ejs-2 --with-ejscript=../ejs-2
make
cd out
chmod 555 bin
cd bin
chmod 555 appweb
cd ../..
cd out/bin
./appweb --config ../../src/test/appweb.conf --verbose

Execution Results in the Following STDOUT:

#
# Running Embedthis Configure 4.0.0
#
# Initializing configure ...
# Sleuth system configuration ...
# Prepare search path ...
# Reading standard product configuration build/product.config ...
# Parse environment variables ...
#
# Discover components for i686-pc-linux
# (Modify build/search.config and build/components/* for component searching)
#
# Scanning for ar: /usr/bin/ar
# Scanning for cc: /usr/bin/cc
# Scanning for make: /usr/bin/make
# Scanning for nm: /usr/bin/nm
# Scanning for strip: /usr/bin/strip
# Scanning for ranlib: /usr/bin/ranlib
# Scanning for doxygen: optional component not included
# Scanning for pcre: builtin
# Scanning for mpr: builtin
# Scanning for http: builtin
# Scanning for openssl: optional component not included
# Scanning for ssl: optional component not included
# Scanning for sqlite: builtin
# Scanning for ejs: builtin
# Scanning for ejscript: builtin
#
# Creating out/inc/buildConfig.h ...
# Generate stub make dependencies ...
#
# Configuration for this build:
#
# Configuring Product: ejs
# Base configuration: build/standard.defaults
# Version: 2.0.0-B0
# Host system: i686-pc-linux, LINUX, i686
# Debug Type: DEBUG
# Tune for: MPR_TUNE_SIZE
# Components: ar cc make nm strip ranlib pcre mpr http sqlite ejs ejscript
#
# Output Directories:
# BLD_OUT_DIR out
# BLD_HOST_INC out/inc
# BLD_HOST_BIN out/bin
# BLD_HOST_LIB out/lib
# BLD_HOST_OBJ out/obj
#
# Installation Directories (when installed):
# PRD /usr/lib/ejs
# VER /usr/lib/ejs/2.0.0
# CFG /usr/lib/ejs
# BIN /usr/lib/ejs/2.0.0/bin
# JEM /usr/lib/ejs/jems
# LIB /usr/lib/ejs/2.0.0/lib
# INC /usr/lib/ejs/2.0.0/inc
#

[Generate] Makefile dependencies
[Compile] build/build/src/dsi.c
[Link] bin/dsi
[Compile] build/build/src/edep.c
[Link] bin/edep
[Compile] build/build/src/getpath.c
[Link] bin/getpath
[Export] src/vm/ejsByteGoto.h
[Compile] src/deps/mpr/makerom.c
[Compile] src/deps/mpr/manager.c
[Compile] src/deps/mpr/mprLib.c
[Compile] src/deps/mpr/mprSsl.c
[Link] lib/libmpr.so
[Link] bin/makerom
[Compile] src/deps/pcre/pcre.c
[Link] lib/libpcre.so
[Compile] src/deps/http/http.c
[Compile] src/deps/http/httpLib.c
[Link] lib/libhttp.so
[Link] bin/http
[Compile] src/deps/sqlite/sqlite3.c
[Compile] src/deps/sqlite/sqlite.c
[Link] lib/libsqlite3.so
[Link] bin/sqlite
[Compile] src/vm/ejsByteCode.c
[Compile] src/vm/ejsException.c
[Compile] src/vm/ejsHelper.c
[Compile] src/vm/ejsInterp.c
ejsInterp.c: In function ‘traceCode’:
ejsInterp.c:3763:22: warning: variable ‘optable’ set but not used [-Wunused-but-set-variable]
[Compile] src/vm/ejsLoader.c
[Compile] src/vm/ejsModule.c
[Compile] src/vm/ejsScope.c
[Compile] src/vm/ejsService.c
[Compile] src/compiler/ecAst.c
[Compile] src/compiler/ecCodeGen.c
[Compile] src/compiler/ecCompiler.c
[Compile] src/compiler/ecLex.c
[Compile] src/compiler/ecModuleWrite.c
[Compile] src/compiler/ecParser.c
[Compile] src/compiler/ecState.c
[Compile] src/core/src/ejsApp.c
[Compile] src/core/src/ejsArray.c
[Compile] src/core/src/ejsBlock.c
[Compile] src/core/src/ejsBoolean.c
[Compile] src/core/src/ejsByteArray.c
[Compile] src/core/src/ejsCache.c
[Compile] src/core/src/ejsCmd.c
[Compile] src/core/src/ejsConfig.c
[Compile] src/core/src/ejsDate.c
[Compile] src/core/src/ejsDebug.c
[Compile] src/core/src/ejsError.c
[Compile] src/core/src/ejsFile.c
[Compile] src/core/src/ejsFileSystem.c
[Compile] src/core/src/ejsFrame.c
[Compile] src/core/src/ejsFunction.c
[Compile] src/core/src/ejsGC.c
[Compile] src/core/src/ejsGlobal.c
[Compile] src/core/src/ejsHttp.c
[Compile] src/core/src/ejsIterator.c
[Compile] src/core/src/ejsJSON.c
[Compile] src/core/src/ejsLocalCache.c
[Compile] src/core/src/ejsMath.c
[Compile] src/core/src/ejsMemory.c
[Compile] src/core/src/ejsMprLog.c
[Compile] src/core/src/ejsNamespace.c
[Compile] src/core/src/ejsNull.c
[Compile] src/core/src/ejsNumber.c
[Compile] src/core/src/ejsObject.c
[Compile] src/core/src/ejsPath.c
[Compile] src/core/src/ejsPot.c
[Compile] src/core/src/ejsRegExp.c
[Compile] src/core/src/ejsSocket.c
[Compile] src/core/src/ejsString.c
[Compile] src/core/src/ejsSystem.c
[Compile] src/core/src/ejsTimer.c
[Compile] src/core/src/ejsType.c
[Compile] src/core/src/ejsUri.c
[Compile] src/core/src/ejsVoid.c
[Compile] src/core/src/ejsWorker.c
[Compile] src/core/src/ejsXML.c
[Compile] src/core/src/ejsXMLList.c
[Compile] src/core/src/ejsXMLLoader.c
[Link] lib/libejs.so
[Export] src/cmd/ejsmod.h
[Compile] src/cmd/doc.c
[Compile] src/cmd/docFiles.c
[Compile] src/cmd/ejs.c
[Compile] src/cmd/ejsc.c
[Compile] src/cmd/ejsmod.c
[Compile] src/cmd/listing.c
[Compile] src/cmd/romFiles.c
[Compile] src/cmd/slotGen.c
[Link] bin/ejsc
[Link] bin/ejsmod
[Link] bin/ejs
[Compile] Core Ejs Classes
[Generate] Core listings and slot files
[Install] ejs.slots.h

[Notice] Rebuild with Modified Slot Definitions
[Compile] src/core/src/ejsApp.c
[Compile] src/core/src/ejsArray.c
[Compile] src/core/src/ejsBlock.c
[Compile] src/core/src/ejsBoolean.c
[Compile] src/core/src/ejsByteArray.c
[Compile] src/core/src/ejsCache.c
[Compile] src/core/src/ejsCmd.c
[Compile] src/core/src/ejsConfig.c
[Compile] src/core/src/ejsDate.c
[Compile] src/core/src/ejsDebug.c
[Compile] src/core/src/ejsError.c
[Compile] src/core/src/ejsFile.c
[Compile] src/core/src/ejsFileSystem.c
[Compile] src/core/src/ejsFrame.c
[Compile] src/core/src/ejsFunction.c
[Compile] src/core/src/ejsGC.c
[Compile] src/core/src/ejsGlobal.c
[Compile] src/core/src/ejsHttp.c
[Compile] src/core/src/ejsIterator.c
[Compile] src/core/src/ejsJSON.c
[Compile] src/core/src/ejsLocalCache.c
[Compile] src/core/src/ejsMath.c
[Compile] src/core/src/ejsMemory.c
[Compile] src/core/src/ejsMprLog.c
[Compile] src/core/src/ejsNamespace.c
[Compile] src/core/src/ejsNull.c
[Compile] src/core/src/ejsNumber.c
[Compile] src/core/src/ejsObject.c
[Compile] src/core/src/ejsPath.c
[Compile] src/core/src/ejsPot.c
[Compile] src/core/src/ejsRegExp.c
[Compile] src/core/src/ejsSocket.c
[Compile] src/core/src/ejsString.c
[Compile] src/core/src/ejsSystem.c
[Compile] src/core/src/ejsTimer.c
[Compile] src/core/src/ejsType.c
[Compile] src/core/src/ejsUri.c
[Compile] src/core/src/ejsVoid.c
[Compile] src/core/src/ejsWorker.c
[Compile] src/core/src/ejsXML.c
[Compile] src/core/src/ejsXMLList.c
[Compile] src/core/src/ejsXMLLoader.c
[Compile] src/vm/ejsByteCode.c
[Compile] src/vm/ejsException.c
[Compile] src/vm/ejsHelper.c
[Compile] src/vm/ejsInterp.c
ejsInterp.c: In function ‘traceCode’:
ejsInterp.c:3763:22: warning: variable ‘optable’ set but not used [-Wunused-but-set-variable]
[Compile] src/vm/ejsLoader.c
[Compile] src/vm/ejsModule.c
[Compile] src/vm/ejsScope.c
[Compile] src/vm/ejsService.c
[Compile] src/compiler/ecAst.c
[Compile] src/compiler/ecCodeGen.c
[Compile] src/compiler/ecCompiler.c
[Compile] src/compiler/ecLex.c
[Compile] src/compiler/ecModuleWrite.c
[Compile] src/compiler/ecParser.c
[Compile] src/compiler/ecState.c
[Link] lib/libejs.so
[Compile] src/cmd/doc.c
[Compile] src/cmd/docFiles.c
[Compile] src/cmd/ejs.c
[Compile] src/cmd/ejsc.c
[Compile] src/cmd/ejsmod.c
[Compile] src/cmd/listing.c
[Compile] src/cmd/slotGen.c
[Link] bin/ejsc
[Link] bin/ejsmod
[Link] bin/ejs
[Compile] ejs.unix.mod
[Compile] ejs.tar.mod
[Generate] jem
[Generate] jem.cmd
[Building] ejs.jem-2.0.0.jem
[Link] bin/manager
[Building] ejs.unix-2.0.0.jem
[Compile] ejs.db.mod
[Building] ejs.db-2.0.0.jem
[Compile] ejs.db.mapper.mod
[Building] ejs.db.mapper-2.0.0.jem
[Compile] src/jems/ejs.db.sqlite/src/ejsSqlite.c
[Link] lib/ejs.db.sqlite.so
[Compile] ejs.db.sqlite.mod
[Building] ejs.db.sqlite-2.0.0.jem
[Compile] ejs.web.mod
[Copy] www to ../../../out/lib/www
[Building] ejs.web-2.0.0.jem
[Export] src/jems/ejs.web/src/ejsWeb.h
[Compile] src/jems/ejs.web/src/ejsFilter.c
[Compile] src/jems/ejs.web/src/ejsHttpServer.c
[Compile] src/jems/ejs.web/src/ejsRequest.c
[Compile] src/jems/ejs.web/src/ejsSession.c
[Compile] src/jems/ejs.web/src/ejsWeb.c
[Link] lib/ejs.web.so
[Compile] ejs.template.mod
[Building] ejs.template-2.0.0.jem
[Update] ejspage
[Building] ejs.tar-2.0.0.jem
[Generate] mvc
[Generate] mvc.cmd
[Building] ejs.mvc-2.0.0.jem
[Export] src/samples/c/composite/sample.slots.h
[Compile] src/samples/c/composite/shape.c
[Link] ./sample.so
[Compile] src/samples/c/native/shape.c
[Link] ./sample.so
[Compile] src/samples/c/evalScript/main.c
[Link] main
[Compile] src/samples/c/evalModule/main.c
[Link] main
[Compile] src/samples/c/evalFile/main.c
[Link] main

#
# Running Embedthis Configure 4.0.0
#
# Initializing configure ...
# Sleuth system configuration ...
# Prepare search path ...
# Reading standard product configuration build/product.config ...
# Parse environment variables ...
#
# Discover components for i686-pc-linux
# (Modify build/search.config and build/components/* for component searching)
#
# Scanning for ar: /usr/bin/ar
# Scanning for cc: /usr/bin/cc
# Scanning for make: /usr/bin/make
# Scanning for nm: /usr/bin/nm
# Scanning for strip: /usr/bin/strip
# Scanning for ranlib: /usr/bin/ranlib
# Scanning for ejs: /home/username/source/ejs-2/out/bin/ejs
# Scanning for doxygen: optional component not included
# Scanning for mpr: builtin
# Scanning for http: builtin
# Scanning for openssl: optional component not included
# Scanning for ssl: optional component not included
# Scanning for php: optional component not included
# Scanning for pcre: builtin
# Scanning for ejscript: /home/username/source/ejs-2/out/lib
# Scanning for dir: builtin
# Scanning for cgi: builtin
# Scanning for esp: builtin
# Scanning for appweb: builtin
#
# Creating out/inc/buildConfig.h ...
# Generate stub make dependencies ...
#
# Configuration for this build:
#
# Configuring Product: appweb
# Base configuration: build/standard.defaults
# Version: 4.0.0-B0
# Host system: i686-pc-linux, LINUX, i686
# Debug Type: DEBUG
# Tune for: MPR_TUNE_SIZE
# Components: ar cc make nm strip ranlib ejs mpr http pcre ejscript dir cgi esp appweb
#
# Output Directories:
# BLD_OUT_DIR out
# BLD_HOST_INC out/inc
# BLD_HOST_BIN out/bin
# BLD_HOST_LIB out/lib
# BLD_HOST_OBJ out/obj
#
# Installation Directories (when installed):
# PRD /usr/lib/appweb
# VER /usr/lib/appweb
# CFG /etc/appweb
# BIN /usr/lib/appweb/bin
# JEM /usr/lib/appweb/jems
# LIB /usr/lib/appweb/lib
# WEB /var/www/appweb-default
# INC /usr/lib/appweb/inc
#

[Generate] Makefile dependencies
[Compile] build/build/src/dsi.c
[Link] bin/dsi
[Compile] build/build/src/edep.c
[Link] bin/edep
[Compile] build/build/src/getpath.c
[Link] bin/getpath
[Export] src/deps/sqlite/sqlite3.h
[Compile] src/deps/mpr/manager.c
[Compile] src/deps/pcre/pcre.c
[Compile] src/deps/http/http.c
[Link] bin/http
[Compile] src/deps/sqlite/sqlite3.c
[Compile] src/deps/sqlite/sqlite.c
[Link] lib/libsqlite3.so
[Link] bin/sqlite
[Compile] src/utils/auth.c
[Compile] src/utils/cgiProgram.c
[Compile] src/utils/setConfig.c
[Link] bin/auth
[Link] bin/setConfig
[Link] bin/appman
[Compile] src/esp/edi.c
[Compile] src/esp/espAbbrev.c
[Compile] src/esp/esp.c
[Compile] src/esp/espFramework.c
[Compile] src/esp/espHtml.c
[Compile] src/esp/espSession.c
[Compile] src/esp/espTemplate.c
[Compile] src/esp/mdb.c
[Compile] src/esp/sdb.c
[Compile] src/modules/dirHandler.c
[Compile] src/modules/fileHandler.c
[Compile] src/modules/cgiHandler.c
[Compile] src/modules/espHandler.c
[Compile] src/modules/ejsHandler.c
[Compile] src/config.c
[Compile] src/convenience.c
[Compile] src/log.c
[Compile] src/server.c
[Link] lib/libappweb.so
[Link] lib/mod_cgi.so
[Link] lib/mod_ejs.so
[Link] lib/mod_esp.so
[Copy] esp.conf to ../../out/lib/esp.conf
[Link] bin/cgiProgram
[Compile] src/server/appweb.c
[Compile] src/server/romFiles.c
[Link] bin/appweb
[Patch] appweb.conf
[Export] src/test/testAppweb.h
[Compile] src/test/testAppweb.c
[Compile] src/test/testHttp.c
[Link] bin/testAppweb
[Compile] src/samples/c/simpleServer/simpleServer.c
[Link] bin/simpleServer
[Compile] src/samples/c/simpleClient/simpleClient.c
[Link] bin/simpleClient
[Compile] src/samples/c/simpleHandler/simpleHandler.c
[Link] lib/simpleHandler.so
[Compile] src/samples/c/simpleEjs/simpleEjs.c
[Link] simpleEjs
appweb: 2: Configuration for Embedthis Ejscript
appweb: 2: ---------------------------------------------
appweb: 2: Version: 2.0.0-B0
appweb: 2: BuildType: DEBUG
appweb: 2: CPU: i686
appweb: 2: OS: LINUX
appweb: 2: Distribution: ubuntu 11.10
appweb: 2: Host: username-VirtualBox
appweb: 2: Configure:
appweb: 2: ---------------------------------------------
appweb: 2: Config File /home/username/source/appweb-4/src/test/appweb.conf
appweb: Error: Can't find module "mod_ejs", cwd: "/home/username/source/appweb-4/out/bin", search path "../../out/bin:../../out/lib:/home/username/source/appweb-4/out/bin:/home/username/source/appweb-4/out/lib:/usr/lib/appweb/lib"
appweb: Error: Can't find stage ejsHandler
appweb: Error: Can't add handler ejsHandler
appweb: Error: Error with directive "AddHandler"
At line 71 in /home/username/source/appweb-4/src/test/appweb.conf

When I go to execute appweb with the test configuration located at appweb-4/src/test/appweb.conf appweb fails to detected the shared objects. Upon checking the bin I find that the SOs are located in appweb-4/out/lib. The following files are there:

ejs.db.mapper.mod
ejs.db.mod
ejs.db.sqlite.mod
ejs.db.sqlite.so
ejs.mod
ejs.tar.mod
ejs.template.mod
ejs.unix.mod
ejs.web.mod
ejs.web.so
esp.conf
libappweb.so
libejs.so
libhttp.so
libmpr.so
libpcre.so
libsqlite3.so
mod_cgi.so
mod_ejs.so
mod_esp.so
simpleHandler.so

As you can see there is a SO for ESP and for EJS so it should be fine. I'm not sure why AppWeb isn't detecting the SOs but I expected it to work. I have also tried modifying the test appweb.conf to had a loadmodulepath that pointed directly to the lib folder described above and had the same issue.

Please note that I also ran into this exact issue in Windows XP.