apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55860] New: apr build process fails because wrong headers found in directory /usr/local/include
Date Sun, 08 Dec 2013 17:18:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55860

            Bug ID: 55860
           Summary: apr build process fails because wrong headers found in
                    directory /usr/local/include
           Product: APR
           Version: 1.5.0
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: dclarke@blastwave.org

This bug looks similar to
https://issues.apache.org/bugzilla/show_bug.cgi?id=55789
and while this looks to be a build bug on Solaris I will test and verify that
we
have the same problem on RHEL also.  For now this bug is on Solaris 10
certainly. 

Between apr version 1.4.8 and 1.5.0 there was a new test added in the
tests/Makefile
called testescape.lo however this problem may have also existed in 1.4.8
release. 
Let's just focus on the new release which is needed for httpd 2.4.7 to compile.

Regardless the source ./test/testescape.c makes two calls to
apr_pescape_shell()
at lines 39 and 54 thus : 

    dest = apr_pescape_shell(pool, src);

However the function apr_pescape_shell() is not defined in any headers that the 
build/test process can locate and therefore : 

node002$ ./testall -v 
testatomic          : SUCCESS
testdir             : SUCCESS
testdso             : SUCCESS
testdup             : SUCCESS
testenv             : SUCCESS
testescape          : -ld.so.1: testall: fatal: relocation error: file testall:
symbol apr_pescape_shell: referenced symbol not found
Killed

We can clearly see the function in the header :

node002$ grep "apr_pescape_shell" ./include/apr_escape.h
APR_DECLARE(const char *) apr_pescape_shell(apr_pool_t *p, const char *str)

However that is of little help if the compiler can not locate it. 

The required header simply does not exist in /usr/local/include/apr-1 because 
we have not done a "gmake install" yet because the testsuite fails.  However 
it seems as if the build process and the test harness are looking for the 
required headers in the installation target $PREFIX/include/apr-1.

To test and prove my theory I will run "gmake install" *before* the testsuite
runs correctly and then re-run the "testall -v" thus : 

node002$ 
node002$ gmake install 
gmake[1]: Entering directory `/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001'
gmake[1]: Nothing to be done for `local-all'.
gmake[1]: Leaving directory `/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001'
/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/build/mkdir.sh /usr/local/lib
/usr/local/bin /usr/local/build-1 \
             /usr/local/lib/pkgconfig /usr/local/include/apr-1
build/install.sh -c -m 644
/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/include/apr.h
/usr/local/include/apr-1
for f in /usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/include/apr_*.h; do \
    build/install.sh -c -m 644 ${f} /usr/local/include/apr-1; \
done
/usr/local/bin/bash /usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/libtool
--mode=install build/install.sh -c -m 755 libapr-1.la /usr/local/lib
libtool: install: build/install.sh -c -m 755 .libs/libapr-1.so.0.5.0
/usr/local/lib/libapr-1.so.0.5.0
libtool: install: (cd /usr/local/lib && { ln -s -f libapr-1.so.0.5.0
libapr-1.so.0 || { rm -f libapr-1.so.0 && ln -s libapr-1.so.0.5.0
libapr-1.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libapr-1.so.0.5.0
libapr-1.so || { rm -f libapr-1.so && ln -s libapr-1.so.0.5.0 libapr-1.so; };
})
libtool: install: chmod +x /usr/local/lib/libapr-1.so.0.5.0
libtool: install: build/install.sh -c -m 755 .libs/libapr-1.lai
/usr/local/lib/libapr-1.la
libtool: install: build/install.sh -c -m 755 .libs/libapr-1.a
/usr/local/lib/libapr-1.a
libtool: install: chmod 644 /usr/local/lib/libapr-1.a
libtool: install: ranlib /usr/local/lib/libapr-1.a
build/install.sh -c -m 644 apr.exp /usr/local/lib/apr.exp
build/install.sh -c -m 644 apr.pc /usr/local/lib/pkgconfig/apr-1.pc
for f in libtool shlibtool; do \
    if test -f ${f}; then build/install.sh -c -m 755 ${f} /usr/local/build-1;
fi; \
done
build/install.sh -c -m 755
/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/build/mkdir.sh
/usr/local/build-1
for f in make_exports.awk make_var_export.awk; do \
    build/install.sh -c -m 644
/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.001/build/${f} /usr/local/build-1;
\
done
build/install.sh -c -m 644 build/apr_rules.out /usr/local/build-1/apr_rules.mk
build/install.sh -c -m 755 apr-config.out /usr/local/bin/apr-1-config
node002$ 

node002$ cd test 
node002$ ./testall -v 
testatomic          : SUCCESS
testdir             : SUCCESS
testdso             : SUCCESS
testdup             : SUCCESS
testenv             : SUCCESS
testescape          : SUCCESS
testfile            : SUCCESS
testfilecopy        : SUCCESS
testfileinfo        : SUCCESS
testflock           : SUCCESS
testfmt             : SUCCESS
testfnmatch         : SUCCESS
testargs            : SUCCESS
testhash            : SUCCESS
testipsub           : SUCCESS
testlock            : SUCCESS
testcond            : SUCCESS
testlfs             : |Line 345: Large Files not supported                     
                                                   SUCCESS
testmmap            : SUCCESS
testnames           : SUCCESS
testoc              : SUCCESS
testpath            : SUCCESS
testpipe            : SUCCESS
testpoll            : SUCCESS
testpools           : SUCCESS
testproc            : SUCCESS
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : SUCCESS
testsockopt         : |Line 84: TCP isn't corkable                             
                                                   SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
All tests passed.


QED. 

Therefore the build process may have other problems that I can not see because
I
see a test fail due to the headers being in the wrong place I must wonder what
things are silently happening with the wrong headers?  Tough to say. 

The safe thing to do is to compile and test apr-1.5.0 *twice* like so : 

------- workaround process -------------

1) download, check sig and then unpack the sources in a build dir
2) run configure as per usual 
3) run make 
4) run make check and watch a test fail
5) make install regardless of result in (4)
6) unpack the sources into a new build dir 
7) re-run configure again as per (2)
8) re-run the build 
9) re-run the testsuite 

If I follow that sequence of steps then I know that the headers being used in
both the build and the test stages will be correct, regardless of their
location.

Just to hammer the coffin lid closed here I will follow steps 6 through 9 :

APR Lock Performance Test
==============

apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 1 threads    OK
microseconds: 372761 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 1 threads    OK
microseconds: 390794 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 1 threads    OK
microseconds: 1000384 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 2 threads    OK
microseconds: 1679167 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 2 threads    OK
microseconds: 937599 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 2 threads    OK
microseconds: 35267593 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 3 threads    OK
microseconds: 1213406 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 3 threads    OK
microseconds: 3344819 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 3 threads    OK
microseconds: 53248783 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 4 threads    OK
microseconds: 1839012 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 4 threads    OK
microseconds: 3631924 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 4 threads    OK
microseconds: 66622351 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 5 threads    OK
microseconds: 4923800 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 5 threads    OK
microseconds: 5524269 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 5 threads    OK
microseconds: 80377977 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (UNNESTED)          OK
    Starting 6 threads    OK
microseconds: 3367671 usec
apr_thread_mutex_t Tests
    Initializing the apr_thread_mutex_t (NESTED)            OK
    Starting 6 threads    OK
microseconds: 5141609 usec
apr_thread_rwlock_t Tests
    Initializing the apr_thread_rwlock_t                    OK
    Starting 6 threads    OK
microseconds: 99582523 usec
Trying proc mutexes with mechanism `default'...
  Mutex mechanism `default' is global in scope on this platform.
Trying global mutexes with mechanism `default'...
  no problems encountered...
Trying proc mutexes with mechanism `sysvsem'...
  Mutex mechanism `sysvsem' is global in scope on this platform.
Trying global mutexes with mechanism `sysvsem'...
  no problems encountered...
Trying proc mutexes with mechanism `posix'...
  Mutex mechanism `posix' is global in scope on this platform.
Trying global mutexes with mechanism `posix'...
  no problems encountered...
Trying proc mutexes with mechanism `fcntl'...
  Mutex mechanism `fcntl' is not global in scope on this platform.
Trying global mutexes with mechanism `fcntl'...
  no problems encountered...
Trying proc mutexes with mechanism `proc_pthread'...
  Mutex mechanism `proc_pthread' is global in scope on this platform.
Trying global mutexes with mechanism `proc_pthread'...
  no problems encountered...
testatomic          : SUCCESS
testdir             : SUCCESS
testdso             : SUCCESS
testdup             : SUCCESS
testenv             : SUCCESS
testescape          : SUCCESS
testfile            : SUCCESS
testfilecopy        : SUCCESS
testfileinfo        : SUCCESS
testflock           : SUCCESS
testfmt             : SUCCESS
testfnmatch         : SUCCESS
testargs            : SUCCESS
testhash            : SUCCESS
testipsub           : SUCCESS
testlock            : SUCCESS
testcond            : SUCCESS
testlfs             : |Line 345: Large Files not supported                     
                                                   SUCCESS
testmmap            : SUCCESS
testnames           : SUCCESS
testoc              : SUCCESS
testpath            : SUCCESS
testpipe            : SUCCESS
testpoll            : SUCCESS
testpools           : SUCCESS
testproc            : SUCCESS
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : SUCCESS
testsockopt         : |Line 84: TCP isn't corkable                             
                                                   SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
All tests passed.
Creating a test file...
Sending the file...
apr_socket_sendfile() updated offset with 0
apr_socket_sendfile() updated len with 370049
bytes really sent: 370049
After apr_socket_sendfile(), the kernel file pointer is at offset 0.
client: apr_socket_sendfile() worked as expected!
Waiting for a client to connect...
Processing a client...
server: apr_socket_sendfile() worked as expected!
Creating a test file...
Sending the file...
Calling apr_socket_sendfile()...
Headers (3):
        15 bytes (1)
        5 bytes (E)
        80000 bytes (^)
File: 200000 bytes from offset 0
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 211092 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 68928 bytes from offset 131072
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->11, sent 0 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 68928 bytes from offset 131072
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 68928 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 0 bytes from offset 200000
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->11, sent 0 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 0 bytes from offset 200000
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 90029 bytes
After apr_socket_sendfile(), the kernel file pointer is at offset 0.
client: apr_socket_sendfile() worked as expected!
Waiting for a client to connect...
Processing a client...
server: apr_socket_sendfile() worked as expected!
Creating a test file...
Sending the file...
Calling apr_socket_sendfile()...
Headers (3):
        15 bytes (1)
        5 bytes (E)
        80000 bytes (^)
File: 200000 bytes from offset 0
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 211092 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 68928 bytes from offset 131072
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 68928 bytes
Calling apr_socket_sendfile()...
Headers (0):
File: 0 bytes from offset 200000
Trailers (3):
        19 bytes
        10 bytes
        90000 bytes
apr_socket_sendfile()->0, sent 90029 bytes
After apr_socket_sendfile(), the kernel file pointer is at offset 0.
client: apr_socket_sendfile() worked as expected!
Waiting for a client to connect...
Processing a client...
server: apr_socket_sendfile() worked as expected!
gmake[1]: Leaving directory
`/usr/local/build/apr-1.5.0_SunOS5.10_sparcv9.002/test'
node002$ 

There we have a very clean testsuite and thus APR 1.5.0 may be actually
installed 
and then move onwards to apr-util and httpd.

I will say that the output from testsockopt and testlfs could be cleaned up
such that we simply see "SUCCESS" and not the somewhat misleading messages
seen above.


Dennis Clarke  Sun Dec  8 17:15:57 GMT 2013

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message