[wsf-c-dev] [jira] Commented: (WSFPHP-376) Build fails on debian/no test to check workaround

Alessandro Vesely (JIRA) jira at wso2.org
Thu May 14 07:56:25 PDT 2009


    [ https://wso2.org/jira/browse/WSFPHP-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=25848#action_25848 ] 

Alessandro Vesely commented on WSFPHP-376:
------------------------------------------

WORKAROUND
The following is a 9-steps recipe for building and installing wso2-wsf-php 2.0.0 on a debian machine.
See also http://wso2.org/forum/thread/4788 for an alternative approach

(lines starting with $ are user commands, # for root, comments are parenthesized)

1) unpack and configure to your liking
$ tar -xzf wso2-wsf-php-src-2.0.0.tar.gz
$ cd wso2-wsf-php-src-2.0.0
$ ./configure --prefix=/usr/local \
    --disable-fast-install \
    --enable-tests \
    --enable-dependency-tracking \
    --enable-libxml2 \
    --disable-guththila

2) build wsf-c first --IMHO, this strategy should inspire the eventual fix
$ cd wsf_c
$ make
$ WSFC_HOME=/usr/local
$ export WSFC_HOME
$ make check
   (still not clean: axis2.xml is not yet found, the correct WSFC_HOME may depend on the test...)
# make install

3) build the whole package
$ cd ..
$ make
    (make check fails at this point)
# make install
    (this installs wsf-c once more)
  
4) update ld.so.cache paths
    (your configuration may vary, check e.g. ldd /usr/local/lib/libaxis2_http_sender.so)
# echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
    (if /usr/local/lib is not already configured)
# ldconfig

5) explicitly remove the wrong rpath from the installed wsf.so
    (chrpath is in debian stable; check ldd /usr/lib/php5/20060613/wsf.so before and after. Notice that wsf.so is installed in the right place despite the --prefix)
# chrpath -d /usr/lib/php5/20060613/wsf.so
    
6) copy scripts: e.g.
# rsync -rlt ./scripts/ /whatever/your/configured/php_include
  
7) adjust php.ini: add the extension and extension_dir clauses, and the following snippet, if you like it

[wsf]

; Path to where you have WSO2 WSF/C installed.
; see http://ws.apache.org/axis2/c/docs/axis2c_manual.html#repo_folder
wsf.home = "/usr/local"

; Path to the folder into which the WSO2 WSF/PHP log files will be written.
; log files named wsf_php_client.log and wsf_php_server.log will be written
; to this given location.
; The apache2 log directory is logrotated, see /etc/logrotate.d/apache2
wsf.log_path = "/var/log/apache2"


; This is an integer value indicating the log_level to be used by the WSF/PHP
; It can be one of the following values.
; 0 -> CRITICAL ( Only critical errors will be logged )
; 1 -> ERROR ( Errors will be logged)
; 2 -> WARNING ( Errors and Warnings will be logged)
; 3 -> INFO ( Errors , Warnings and Information will be logged)
; 4 -> DEBUG ( All log messages including debug messages will be logged)
wsf.log_level = 3

; This is the location where Sqlite database will be created when using Reliable Messaging.
; make sure to specify a directory location has that has write permissions for the apache server.
; By default "/tmp" directory will be used.
; Using a subdirectory may improve security; however, it requires mkdir /tmp/wsf --e.g. in /etc/default/apache2
wsf.rm_db_dir = "/tmp/wsf"

; This is the location where the cached attachments will be saved.
; This will happen only if you have enabled attachment caching and
; the attachment size if larger than 1 Mb.
; Using a subdirectory may improve security; however, it requires mkdir /tmp/wsf --e.g. in /etc/default/apache2
wsf.attachment_cache_dir = "/tmp/wsf"

; When this is set, the attachment caching will happen if the attachment size
; if larger than 1Mb. That is, received attachments will be saved to the
; attachment cache directory. When sending attachments with this option set
; to 1 will send attachments in a memory efficient way.
wsf.enable_attachment_caching = 1


8) copy samples, adjust aliases, restart
# rsync -a .samples /whatever/your/htdocs/test/dir
    (you must arrange an alias so that http://localhost/samples refers to the same directory where you copied samples to; localhost is used to invoke the service irrespectively of the virtual host where you browse the client.)
# /etc/init.d/apache2 restart

9) test, browsing the sample directory

    (most samples work!)


N.B.: WSF_PHP_LOG_PREFIX still refers to the directory location where the wsf-php src has been compiled. You'll see it in log lines. Besides that, the installation seems relatively independent of that location. 

> Build fails on debian/no test to check workaround
> -------------------------------------------------
>
>                 Key: WSFPHP-376
>                 URL: https://wso2.org/jira/browse/WSFPHP-376
>             Project: WSO2 WSF/PHP
>          Issue Type: Bug
>          Components: Build System / Linux
>    Affects Versions: 2.0.0
>         Environment: Debian etch x86_64
>            Reporter: Alessandro Vesely
>         Attachments: make.output.txt
>
>
> The failing step is the last one in src/Makefile
> $(phplibdir)/wsf.la: ./wsf.la
> 	$(LIBTOOL) --mode=install cp ./wsf.la $(phplibdir)
> An easy workaround would seem to just `cp ./wsf.la $(phplibdir)' without involving libtool. However, since there is no test suite and that is the last step, one cannot know if it worked before installing. I will try again next week (possibly not on a production system.)
> Looking at why libtool fails (see attached output) it seems that the libtool command (the one in wsf.la) in the first line has all the correct paths that would work, e.g. -L/local/dists/wso2/cur/wsf_c/.../.libs. Libtool processing eliminates all those and replaces them with a single -L/usr/local/lib, which is where the library would eventually get installed (since I configured with --prefix=/usr/local). However, those libraries are not installed yet, thus it fails. Note that manually fixing, say, libsandesha2_client, will result in a failure for the next library; that is, ld is lazy on reporting failures.
> See also https://wso2.org/jira/browse/WSFPHP-250?focusedCommentId=16036#action_16036

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the Wsf-c-dev mailing list