- Community Home
- >
- HPE Community, Japan
- >
- HP-UX
- >
- System Management
- >
- 関数 getprpwnam(), getspnam()
system management
1752603
メンバー
4756
オンライン
108788
解決策
フォーラム
カテゴリ
Company
Local Language
戻る
フォーラム
ディスカッションボード
フォーラム
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
ディスカッションボード
ディスカッションボード
ディスカッションボード
フォーラム
ディスカッションボード
戻る
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
ブログ
情報
コミュニティ言語
言語
フォーラム
ブログ
トピックオプション
- RSS フィードを購読する
- トピックを新着としてマーク
- トピックを既読としてマーク
- このトピックを現在のユーザーにフロートします
- ブックマーク
- 購読
- 印刷用ページ
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
01-07-2005 01:56 PM
01-07-2005 01:56 PM
関数 getprpwnam(), getspnam()
●C言語から使用する関数 getprpwnam() について
/etc/passwd 管理下で以下のソースコンパイルを行なうとエラーとなります。
【ソースコード】
#include
#include
#include
main(argc, argv)
int argc;
char * argv[];
{
struct pr_passwd *prpwdata;
prpwdata = (struct pr_passwd *)getprpwnam(uname);
exit(0);
}
【エラー】
/usr/ccs/bin/ld: Unsatisfied symbols:
getprpwnam (code)
1.高信頼性システムでないとコンパイル出来ないのでしょうか?
2.また、関数 getspnam() も同様のエラーでコンパイル不可でした。
/etc/shadow 管理の状態でないとコンパイル出来ないでしょうか?
/etc/passwd 管理下で以下のソースコンパイルを行なうとエラーとなります。
【ソースコード】
#include
#include
#include
main(argc, argv)
int argc;
char * argv[];
{
struct pr_passwd *prpwdata;
prpwdata = (struct pr_passwd *)getprpwnam(uname);
exit(0);
}
【エラー】
/usr/ccs/bin/ld: Unsatisfied symbols:
getprpwnam (code)
1.高信頼性システムでないとコンパイル出来ないのでしょうか?
2.また、関数 getspnam() も同様のエラーでコンパイル不可でした。
/etc/shadow 管理の状態でないとコンパイル出来ないでしょうか?
3件の返信3
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
01-07-2005 02:22 PM
01-07-2005 02:22 PM
関数 getprpwnam(), getspnam()
私も問題が起きましたが、ld のバグのような現象ですね。
$cc -v aaa.c
cc: informational note 404: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ans
ic/lib/nls/msg/C/%N.cat:
cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
cc: informational note 404: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi aaa.c /var/tmp/ctmAAAa19840 -$ -D__hp9000s800 -D__h
ppa -D__hpux -D__unix -D_ILP32 -e -D_PA_RISC2_0 -D_HPUX_SOURCE -D__STDC_EXT__ -D
__HP_cc=111108
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19840 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19840 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o aaa.o -u main -lc
cc: informational note 413: Entering Link editor.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (aaa.o) was detected.
The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
getprpwnam (code)
--> 同じ現象!!!
$cc -v aaa.c /usr/lib/libsec.sl
cc: informational note 404: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ans
ic/lib/nls/msg/C/%N.cat:
cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
cc: informational note 404: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi aaa.c /var/tmp/ctmAAAa19885 -$ -D__hp9000s800 -D__h
ppa -D__hpux -D__unix -D_ILP32 -e -D_PA_RISC2_0 -D_HPUX_SOURCE -D__STDC_EXT__ -D
__HP_cc=111108
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19885 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o aaa.o /usr/lib/libsec.sl -u main -lc
cc: informational note 413: Entering Link editor.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (aaa.o) was detected.
The linked output may not run on a PA 1.x system.
--> /usr/lib/libsec.sl を指定リンクするとOK。
$cc -v aaa.c
cc: informational note 404: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ans
ic/lib/nls/msg/C/%N.cat:
cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
cc: informational note 404: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi aaa.c /var/tmp/ctmAAAa19840 -$ -D__hp9000s800 -D__h
ppa -D__hpux -D__unix -D_ILP32 -e -D_PA_RISC2_0 -D_HPUX_SOURCE -D__STDC_EXT__ -D
__HP_cc=111108
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19840 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19840 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o aaa.o -u main -lc
cc: informational note 413: Entering Link editor.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (aaa.o) was detected.
The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
getprpwnam (code)
--> 同じ現象!!!
$cc -v aaa.c /usr/lib/libsec.sl
cc: informational note 404: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ans
ic/lib/nls/msg/C/%N.cat:
cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
cc: informational note 404: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi aaa.c /var/tmp/ctmAAAa19885 -$ -D__hp9000s800 -D__h
ppa -D__hpux -D__unix -D_ILP32 -e -D_PA_RISC2_0 -D_HPUX_SOURCE -D__STDC_EXT__ -D
__HP_cc=111108
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa19885 aaa.o -Faaa.c -Oq00,al,ag,cn,Lm,sz,Ic
,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,d
p,fs,bp,wp,cl,mo,xn,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o aaa.o /usr/lib/libsec.sl -u main -lc
cc: informational note 413: Entering Link editor.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (aaa.o) was detected.
The linked output may not run on a PA 1.x system.
--> /usr/lib/libsec.sl を指定リンクするとOK。
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
01-07-2005 02:57 PM
01-07-2005 02:57 PM
関数 getprpwnam(), getspnam()
テレコム担当者 様
/usr/lib/libsec.sl 指定でコンパイルできました。
ありがとうございました。
/usr/lib/libsec.sl 指定でコンパイルできました。
ありがとうございました。
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
01-07-2005 03:06 PM
01-07-2005 03:06 PM
関数 getprpwnam(), getspnam()
すでにテレコム担当者さんから回答がでているので
あえて書き込むことではないかもしれませんが、
getprpwnam()をmanで調べると、
"これらのルーチンを使用したプログラムは必ず、 -lsec を使用してコンパイルしてください。"
と記載されています。関数などがおかしな振る舞いを
したり、リンクできないときはmanを参照すると
けっこういい情報がでてきたりしますよ。
あえて書き込むことではないかもしれませんが、
getprpwnam()をmanで調べると、
"これらのルーチンを使用したプログラムは必ず、 -lsec を使用してコンパイルしてください。"
と記載されています。関数などがおかしな振る舞いを
したり、リンクできないときはmanを参照すると
けっこういい情報がでてきたりしますよ。
上記の意見は、Hewlett Packard Enterpriseではなく、著者の個人的な意見です。 このサイトを使用することで、利用規約と参加規約に同意したことになります 。
© Copyright 2024 Hewlett Packard Enterprise Development LP