기술지원 문의

freebsd에서 레진이 설치가 안되엽...도와주세엽.
진효영 / 2003-02-18 00:00

resin-2.1.7을 설치하려고 하려고 하는데..

레진 설치 성공 하신분 있으시면 도와주세엽..

리눅스에서는 
아파치랑  java 1.4깔고 resin 컴파일하면 쉽게되던 것이...
프비에서는 조금 다른 것 같네엽..

프비에서 레진을 설치하기 위해….
일단 linux-sun-jdk14 포트를 설치하고…
물로 linux 에뮬도 같이 설치했고요
그리고 아파치는 컴파일 했습니다.
아파치 컴파일 할 때 --enable-module=so 도 추가 했고요..
그리고….마직 막으로 레진을 컴파일 하려는데…문제가 생기네엽…

첫째
./configure --prefix=/usr/local/resin
 --with-apxs=/usr/local/sbin/apxs
 --with-java-home=/usr/local/linux-sun-jdk1.4.1

하니깐..

------------------------------------------------------------
checking build system type... i386-unknown-freebsd4.7
checking host system type... i386-unknown-freebsd4.7
checking target system type... i386-unknown-freebsd4.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for ld used by GCC... /usr/libexec/elf/ld
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
Using Apache configuration /usr/local/etc/apache/httpd.conf
Using Apache CFLAGS: -DLOGIN_CAP -DDOCUMENT_LOCATION=\"/usr/local/www/data\"  -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 -funsigned-char -DUSE_EXPAT -I../lib/expat-lite -O -pipe -march=pentiumpro
checking for JAVA_HOME...
/usr/local/linux-sun-jdk1.4.1
configure: WARNING: Cant find JNI directory /usr/local/linux-sun-jdk1.4.1/include/freebsd        <==경고나온부분
Using openssl include in ... /usr/include
Using openssl lib in ... /usr/lib
Using openssl flags in ... -lc_r -lssl -lcrypto
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/wrapper.pl
config.status: creating bin/fastcgirunner.pl
config.status: creating src/c/plugin/Makefile
config.status: creating src/c/plugin/common/Makefile
config.status: creating src/c/plugin/nsapi/Makefile
config.status: creating src/c/plugin/apache/Makefile
config.status: creating src/c/plugin/apache2/Makefile
config.status: creating src/c/plugin/resin/Makefile
config.status: creating src/c/plugin/hardcore/Makefile
config.status: creating src/c/plugin/common/version.h
config.status: creating src/c/jni/Makefile
config.status: creating contrib/init.resin
config.status: executing depfiles commands

 

이렇게 경고가 나와서…..

/usr/local/linux-sun-jdk1.4.1/include 에 가보니깐
/usr/local/linux-sun-jdk1.4.1/include/freebsd 가 없고 /usr/local/linux-sun-jdk1.4.1/include/linux 있더라고엽..

그래서 
ln -s /usr/local/linux-sun-jdk1.4.1/include/linux/ /usr/local/linux-sun-jdk1.4.1/include/freebsd 해주고

다시 configure 하니깐 경우 메시지가 안나왔습니다…
그래서….담으로 넘갔졉…^^;;기뻐하며

 

2번째 (본격적인 문제)
이제 make를 했졉..
-----------------------------------------------------------
(cd src/c/plugin; make)
for dir in common apache resin; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 stream.c
gcc -c -I/usr/include -g -O2 registry.c
gcc -c -I/usr/include -g -O2 config.c
gcc -c -I/usr/include -g -O2 memory.c
/usr/libexec/elf/ld -r -o common.o stream.o registry.o config.o memory.o
gcc -c -I/usr/include -g -O2 -fpic stream.c && mv stream.o stream.lo
gcc -c -I/usr/include -g -O2 -fpic registry.c && mv registry.o registry.lo
gcc -c -I/usr/include -g -O2 -fpic config.c && mv config.o config.lo
gcc -c -I/usr/include -g -O2 -fpic memory.c && mv memory.o memory.lo
/usr/libexec/elf/ld -r -o common.lo stream.lo registry.lo config.lo memory.lo
gcc -c -I/usr/local/include/apache -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I../common -g -O2 -DLOGIN_CAP -DDOCUMENT_LOCATION=\"/usr/local/www/data\"  -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 -funsigned-char -DUSE_EXPAT -I../lib/expat-lite -O -pipe -march=pentiumpro -fpic mod_caucho.c && mv mod_caucho.o mod_caucho.lo
/usr/libexec/elf/ld -o mod_caucho.so -shared mod_caucho.lo ../common/stream.lo ../common/registry.lo ../common/config.lo ../common/memory.lo
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c resin.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c std.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c memory.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c ssl.c
gcc  -o resin resin.o ../common/common.o std.o memory.o ssl.o -lc_r -lssl -lcrypto -ldl
/usr/libexec/elf/ld: cannot find -ldl
*** Error code 1

Stop in /root/resin-2.1.7/src/c/plugin/resin.
*** Error code 1

Stop in /root/resin-2.1.7/src/c/plugin.
*** Error code 1

Stop in /root/resin-2.1.7.

이런 메시지가 나오더군엽..
FreeBSD  질답 게시판을 뒤져보니깐….
유정석님의 몇가지 질답글에서 문제점 해결 할수 있는 키를 찾았습니다.
유정석님 글내용대로 

src/c/plugin/resin/Makefile 파일에서 
-ldl 옵션을 -pthread 로 바꿔라고 되어있더군엽....

바꾸고 make 실행했습니다.....
-----------------------------------------------------------
(cd src/c/plugin; make)
for dir in common apache resin; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 stream.c
gcc -c -I/usr/include -g -O2 registry.c
gcc -c -I/usr/include -g -O2 config.c
gcc -c -I/usr/include -g -O2 memory.c
/usr/libexec/elf/ld -r -o common.o stream.o registry.o config.o memory.o
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c resin.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c std.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c memory.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c ssl.c
gcc  -o resin resin.o ../common/common.o std.o memory.o ssl.o -lc_r -lssl -lcrypto -pthread
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c jni_vfs.c
/usr/libexec/elf/ld -shared -o libresin.so jni_vfs.o std.o memory.o ssl.o -lc_r -lssl -lcrypto
(cd resin; make resin_so)
-----------------------------------------------------------
 
무사히 되더군엽..

 

세번째(해결이 안되고 있는 문제)
이제 make install만 남았습니다.
이제 거의 다었구나 하는 기대로 make install 을 했습니다..
-----------------------------------------------------------
(cd src/c/plugin; make install)
(cd resin; make install_so)
mkdir /root/resin-2.1.7/libexec
cp libresin.so /root/resin-2.1.7/libexec
for dir in common apache resin; do (cd $dir; make install); done
sh install.sh -conf /usr/local/etc/apache/httpd.conf -libexec /usr/local/libexec/apache  -resin_home /root/resin-2.1.7
cp mod_caucho.so /usr/local/libexec/apache
mkdir /root/resin-2.1.7/libexec
mkdir: /root/resin-2.1.7/libexec: File exists
*** Error code 1 (ignored)
cp libresin.so /root/resin-2.1.7/libexec
cp resin /root/resin-2.1.7/bin
 

여기서 에러가 났습니다..허거덕…

무신 에런지 어디서 어떻게 해야하는지 막막하군더군엽…
혹시나 해서 파일은 옮겨졌는가 해서
물론 prefix로 지정된 곳은 찾으니깐 디렉토리 만들어져 있지 않았습니다….


도와주세욥

 

Re:freebsd에서 레진이 설치가 안되엽...도와주세엽.
관리자 / 2003-02-18 00:00

고생하셔서 잘 해오셨네요.
아파치 플러그인 컴파일시 prefix는 주실 필요없어요.
--with-apache 혹은
--with-apxs를 주시면됩니다.

다만 직접 만드신 mod_caucho.so가 정상적으로
작동할 지 어떨지는 모르겠네요.

make install 에서는 아파치의 libexec에
mod_caucho.so파일을 copy하고
httpd.conf에 resin설정을 넣어주고요.
에러는 libexec관련 warning은 무시하셔도 됩니다.

직접해주시려면
일단 src/c/plugin/apache/mod_caucho.so가 생성되어
있으면 요넘을 apache/libexec/에 copy하시고
아파치 httpd.conf의 마지막에

LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so
#AddModule mod_caucho.c

  CauchoConfigFile /usr/local/resin/conf/resin.conf

정도만 해주시면 됩니다.





--진효영 님의 글 [2003-02-18 11:37:04]
>resin-2.1.7을 설치하려고 하려고 하는데..

레진 설치 성공 하신분 있으시면 도와주세엽..

리눅스에서는 
아파치랑  java 1.4깔고 resin 컴파일하면 쉽게되던 것이...
프비에서는 조금 다른 것 같네엽..

프비에서 레진을 설치하기 위해….
일단 linux-sun-jdk14 포트를 설치하고…
물로 linux 에뮬도 같이 설치했고요
그리고 아파치는 컴파일 했습니다.
아파치 컴파일 할 때 --enable-module=so 도 추가 했고요..
그리고….마직 막으로 레진을 컴파일 하려는데…문제가 생기네엽…

첫째
./configure --prefix=/usr/local/resin
 --with-apxs=/usr/local/sbin/apxs
 --with-java-home=/usr/local/linux-sun-jdk1.4.1

하니깐..

------------------------------------------------------------
checking build system type... i386-unknown-freebsd4.7
checking host system type... i386-unknown-freebsd4.7
checking target system type... i386-unknown-freebsd4.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for ld used by GCC... /usr/libexec/elf/ld
checking if the linker (/usr/libexec/elf/ld) is GNU ld... yes
Using Apache configuration /usr/local/etc/apache/httpd.conf
Using Apache CFLAGS: -DLOGIN_CAP -DDOCUMENT_LOCATION=\"/usr/local/www/data\"  -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 -funsigned-char -DUSE_EXPAT -I../lib/expat-lite -O -pipe -march=pentiumpro
checking for JAVA_HOME...
/usr/local/linux-sun-jdk1.4.1
configure: WARNING: Cant find JNI directory /usr/local/linux-sun-jdk1.4.1/include/freebsd        <==경고나온부분
Using openssl include in ... /usr/include
Using openssl lib in ... /usr/lib
Using openssl flags in ... -lc_r -lssl -lcrypto
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/wrapper.pl
config.status: creating bin/fastcgirunner.pl
config.status: creating src/c/plugin/Makefile
config.status: creating src/c/plugin/common/Makefile
config.status: creating src/c/plugin/nsapi/Makefile
config.status: creating src/c/plugin/apache/Makefile
config.status: creating src/c/plugin/apache2/Makefile
config.status: creating src/c/plugin/resin/Makefile
config.status: creating src/c/plugin/hardcore/Makefile
config.status: creating src/c/plugin/common/version.h
config.status: creating src/c/jni/Makefile
config.status: creating contrib/init.resin
config.status: executing depfiles commands

 

이렇게 경고가 나와서…..

/usr/local/linux-sun-jdk1.4.1/include 에 가보니깐
/usr/local/linux-sun-jdk1.4.1/include/freebsd 가 없고 /usr/local/linux-sun-jdk1.4.1/include/linux 있더라고엽..

그래서 
ln -s /usr/local/linux-sun-jdk1.4.1/include/linux/ /usr/local/linux-sun-jdk1.4.1/include/freebsd 해주고

다시 configure 하니깐 경우 메시지가 안나왔습니다…
그래서….담으로 넘갔졉…^^;;기뻐하며

 

2번째 (본격적인 문제)
이제 make를 했졉..
-----------------------------------------------------------
(cd src/c/plugin; make)
for dir in common apache resin; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 stream.c
gcc -c -I/usr/include -g -O2 registry.c
gcc -c -I/usr/include -g -O2 config.c
gcc -c -I/usr/include -g -O2 memory.c
/usr/libexec/elf/ld -r -o common.o stream.o registry.o config.o memory.o
gcc -c -I/usr/include -g -O2 -fpic stream.c && mv stream.o stream.lo
gcc -c -I/usr/include -g -O2 -fpic registry.c && mv registry.o registry.lo
gcc -c -I/usr/include -g -O2 -fpic config.c && mv config.o config.lo
gcc -c -I/usr/include -g -O2 -fpic memory.c && mv memory.o memory.lo
/usr/libexec/elf/ld -r -o common.lo stream.lo registry.lo config.lo memory.lo
gcc -c -I/usr/local/include/apache -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I../common -g -O2 -DLOGIN_CAP -DDOCUMENT_LOCATION=\"/usr/local/www/data\"  -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 -funsigned-char -DUSE_EXPAT -I../lib/expat-lite -O -pipe -march=pentiumpro -fpic mod_caucho.c && mv mod_caucho.o mod_caucho.lo
/usr/libexec/elf/ld -o mod_caucho.so -shared mod_caucho.lo ../common/stream.lo ../common/registry.lo ../common/config.lo ../common/memory.lo
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c resin.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c std.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c memory.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c ssl.c
gcc  -o resin resin.o ../common/common.o std.o memory.o ssl.o -lc_r -lssl -lcrypto -ldl
/usr/libexec/elf/ld: cannot find -ldl
*** Error code 1

Stop in /root/resin-2.1.7/src/c/plugin/resin.
*** Error code 1

Stop in /root/resin-2.1.7/src/c/plugin.
*** Error code 1

Stop in /root/resin-2.1.7.

이런 메시지가 나오더군엽..
FreeBSD  질답 게시판을 뒤져보니깐….
유정석님의 몇가지 질답글에서 문제점 해결 할수 있는 키를 찾았습니다.
유정석님 글내용대로 

src/c/plugin/resin/Makefile 파일에서 
-ldl 옵션을 -pthread 로 바꿔라고 되어있더군엽....

바꾸고 make 실행했습니다.....
-----------------------------------------------------------
(cd src/c/plugin; make)
for dir in common apache resin; do (cd $dir; make); done
gcc -c -I/usr/include -g -O2 stream.c
gcc -c -I/usr/include -g -O2 registry.c
gcc -c -I/usr/include -g -O2 config.c
gcc -c -I/usr/include -g -O2 memory.c
/usr/libexec/elf/ld -r -o common.o stream.o registry.o config.o memory.o
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c resin.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c std.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c memory.c
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c ssl.c
gcc  -o resin resin.o ../common/common.o std.o memory.o ssl.o -lc_r -lssl -lcrypto -pthread
gcc -g -O2 -DRESIN_HOME=\\\"/root/resin-2.1.7\\\" -I/usr/include -I/usr/local/linux-sun-jdk1.4.1/include -I/usr/local/linux-sun-jdk1.4.1/include/freebsd -I../common -DCPU=\\\"i386\\\" -DOS=  -DSSL_ENGINE -c jni_vfs.c
/usr/libexec/elf/ld -shared -o libresin.so jni_vfs.o std.o memory.o ssl.o -lc_r -lssl -lcrypto
(cd resin; make resin_so)
-----------------------------------------------------------
 
무사히 되더군엽..

 

세번째(해결이 안되고 있는 문제)
이제 make install만 남았습니다.
이제 거의 다었구나 하는 기대로 make install 을 했습니다..
-----------------------------------------------------------
(cd src/c/plugin; make install)
(cd resin; make install_so)
mkdir /root/resin-2.1.7/libexec
cp libresin.so /root/resin-2.1.7/libexec
for dir in common apache resin; do (cd $dir; make install); done
sh install.sh -conf /usr/local/etc/apache/httpd.conf -libexec /usr/local/libexec/apache  -resin_home /root/resin-2.1.7
cp mod_caucho.so /usr/local/libexec/apache
mkdir /root/resin-2.1.7/libexec
mkdir: /root/resin-2.1.7/libexec: File exists
*** Error code 1 (ignored)
cp libresin.so /root/resin-2.1.7/libexec
cp resin /root/resin-2.1.7/bin
 

여기서 에러가 났습니다..허거덕…

무신 에런지 어디서 어떻게 해야하는지 막막하군더군엽…
혹시나 해서 파일은 옮겨졌는가 해서
물론 prefix로 지정된 곳은 찾으니깐 디렉토리 만들어져 있지 않았습니다….


도와주세욥