솔라리스에서 mysql 컴파일하기...

sungmoo의 이미지

환경 : Solaris2.6 spark, mysql4.0.18
----------------- errer message -----------------------
[www-yj]$./configure --prefix=/usr/loca/mysql --with-charset=euc-kr
checking build system type... sparc-sun-solaris2.6
checking host system type... sparc-sun-solaris2.6
checking target system type... sparc-sun-solaris2.6
checking for a BSD-compatible install... ./install-sh -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 whether to enable maintainer-specific portions of Makefiles... no
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) nawk
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 gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C preprocessor... gcc -E
checking "C Compiler version"... "gcc 2.8.1"
./configure[3978]: g++: not found
checking "C++ compiler version"... "g++ "
checking for ranlib... ranlib
checking for a sed that does not truncate output... /usr/xpg4/bin/sed
checking for egrep... egrep
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
[www-yj]$
----------------------------- end ----------------------

여기서 c++ lib 파일이 없어서 그렇다고 판단되어 http://ftp.sunfreeware.com/ftp/pub/freeware/sparc/2.6/libstdc++-2.8.1.1-sol26-sparc-local.gz 를 다운받고 압축을 풀었는데 파일이 하나 나오더군요... 그다음 어떻게 해야될지...

루트폴더에는 /lib 폴더가 없었고 /usr/local/lib 에 있었습니다. 그럼 환경변수를 고쳐야하는겁니까?

감사합니다. (__)

다즐링의 이미지

pkgadd -d 파일이름 하시면 깔립니다.

그리고 sunfreeware 에 mysql 패키지도 있습니다.

개인적으로 이야기를 드리자면

"solaris 전문가" 를 불러서 해결하세요.

------------------------------------------------------------------------------------------------
Life is in 다즐링

sungmoo의 이미지

위에 패키지를 설치하고 다시 압축을 풀어서 한거도 위와 같은 에러가 나네요... 무슨문제인지... 그리고 환경변수를 디폴트설정으로 돌려올수있는 명령은 없습니까? 금방 환경변수를 고쳐봤더니... 다른 패키지를 추가할때 않되네요... 휴~
cpp 는 어떤 패키지를 설치하면 될지...

여긴 구석진곳이라 고수도없습니다. ㅠㅠ

sungmoo의 이미지

[www-yj]$pkgadd gcc-3.3.2-sol26-sparc-local
pkgadd: ERROR: no packages were found in </var/spool/pkg>
[www-yj]$

환경변수를 다치기 전까지만 해도 괜찮았는데...

CC=gcc CFLAGS="-O3 -m64 -fno-omit-frame-pointer"
CXX=gcc
CXXFLAGS="-O3 -m64 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"
LDFLAGS='-R/usr/local/lib'
LD_LIBRARY_PATH=/usr/local/lib

이렇게 고쳤었습니다.

이은태의 이미지

/var/spool에 패키지가 위치하지 않고 있으므로

-d 로 경로를 지정하셔야 합니다

[www-yj]$ pkgadd -d . gcc-3.3.2-sol26-sparc-local

:-)

FruitsCandy의 이미지

solaris 5.8 이면 bash가 있습니다. (5.7은 없습니다 깔아야되요)

.bash_profile 을 / 디렉토리에 만드셔서 편집해주시면 됩니다.

아래것은 제가 현재 쓰고 있는 것 입니다. 님께 맞게 편집하세요.

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

#alias g++ a = g++ CDTSSvcx.cpp DB.cpp MString.cpp CServiceModule.cpp\
# FileServer.cpp ClientProgram.cpp ManagerProgram.cpp -lmysqlclient \
# -I/usr/local/mysql/include/mysql -L/usr/local/mysql/lib/mysql \
# -lpthread

# User specific environment and startup programs

PATH=$PATH:/usr/ccs/bin:/usr/ucb/:/usr/ucb/bin:/opt/FSFgdb/bin:/sbin:/usr/sbin:/usr/X/bin:/bin:/usr/local/bin:/usr/bin:/usr/local/mysql/bin:.

#PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:.
#BASH_ENV=$HOME/.bashrc

BASH_ENV=/.bashrc
USERNAME="root"

export PS1='[\h \u \w]#'
export USERNAME BASH_ENV PATH

그 다음 source .bash_profile 해주시고 mysql 컴파일 하시면 됩니다만..

패스가 안잡혀서 그럴수도 있지만. 컴파일러가 없네요

gcc, make , automake , bison , flex 등도 미리 다 설치 주십시요.

나중에 php, apache와 연동하실려면 어차피 있어야 합니다.
저는 mysql 를 패키지로 깔아서 씁니다.

/usr/local/mysql 이 기본 경로로 깔리기 때문에 소스로 컴파일해서

설치하는 것이랑 똑같습니다. 시간도 절약되고 편합니다.

아지랑이류 초환상 공콤 화랑... 포기하다.. T.T

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.