Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Programming Linux FAQ (1)

Answer to the question is as follows :

[code]
1.1), or I need to src/Makefile.global
Src/Makefile.custom document and what changes do I need to do other changes?
1.2) Why do I have trouble when in the absence of libreadline?
1.3) and dlfcn.h libdl lack [REDHAT] why I will have trouble?
1.4) and dlfcn.h libdl lack [SLACKWARE 3.1] why I will have trouble?
1.5) when I withdrew from the back-end compiler, the first being given the lack of documentation that dlfcn.h
1.6) GCC complained that the option was ignored -fpic
1.7), I received the following forms of warning
Warning : cast from pointer to integer of different size
1.8) [SuSE-Linux 4.2-4.4] curses and termcap there?
1.9) ld.so Why do I have?
1.10) Why do I have received `yy_flush_buffer undefined 'mistake?
1.11) How can I a.out system in a translation PostgreSQL?
1.12) with the following information from the production : Why
Yacc-d /disk2/PostgreSQL/src/backend/parser/gram.y
Make : /usr/bin/make can not execute binary file :
1.13) in the src/Makefile.global Lane X11_LIB to libsocket and libnsl quoted there?
1.14) [DEBIAN] libtermcap there?
1.15) [REDHAT] caused me to PostgreSQL RPM?
1.16) when I tried to develop a version of the Linux compiler, the compiler with
Similar information from the following :
In file included from /usr/include/sys/sem.h:8.
From ipc.c:37 :
/usr/include/asm/bitops.h:32 : Warning : no previous prototype for Set_bit '
        ....
Make : *** 1 [ipc.o] Error
117) When postgres compiler, gcc signal 11 and from the report.
1.18), I can install 6.1.1? MkLinux
1.19) from the production or collapse Why?
1.20) How can I do for the 486 or Pentium processor optimization?
1.21) Why do I print time will be surprised when the results (for example,
Changing test 'timespan')?
1.22) Why am I Compiler 6.3.2 why I have not generated any libqp share base?
1.23) Why Compiler failed, and said F_BOOLIN, F_BYTEAIN F_BOOLOUT and not defined?
2.1) pgtclsh compiler, linker did not find libX11
3.1) operating as createuser the script, I received an error that is not defined _fUnKy_POSTPORT_sTuFf_
3.2), I postmaster operating system then told me, 'Bad system call (Core dumped)' (erroneous system call (core dumped))
330) when I tried to start Postmaster why I received the following forms of wrong information
Failed Assertion ( "! (File> 0) : (null) "File :
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c" Line : 257)
! (File> 0) (0)
Initdb could not create template database :
Initdb : cleaning up.
3.4) Why createuser regardless?
3.5) Why do I receive the following message :
IpcMemoryCreate : memKey=155356396, size=760632.
Permission=384IpcMemoryCreate : shmget (. . . , Create that. . . )
Failed : Invalid argument
3.6) Why psql failure with the following error message :
Psql : can 't load library' libpq.so.1 '
3.7) Other strange performance
3.8) When the swap lines running PostgreSQL system when re-starting Linux
Always on the disk for fsck.
3.9) Why change Query 32 spent a lot of time testing?
3.10) Why do some Date / time I get some interesting operations, the roundness?
For example,
Select 'four hours' : : timespan;
Returning '3 hours 59 minutes 60 seconds'?

[/code]

Programming Linux FAQ (1)

[code]
1.1), or I need to o src/Makefile.global
Src/Makefile.custom document and what changes do I need to do other changes?

Src customized catalog operation inside the revised script is the most simple makefile,
It will generate a Makefile.custom for you.

You may need to do other changes is the replacement of Flex 2.5.3.
Chinch this version, which is usually characterized by createuser failure (see issue 340)

If your manual changes makefiles, you set up the following variables * *
PORTNAME= Linux

Now you must also change the variables for your own installation :
POSTGRESDIR

If you open the USE_TCL option, you will need to install the following :
TCL_INCDIR=
TCL_LIBDIR=
TCL_LIB=
TK_INCDIR=
TK_LIBDIR=
TK_LIB=
X11_INCDIR=
X11_LIBDIR=
X11_LIB=

In my Slackware3.0 system, which is :
TCL_INCDIR= /usr/include/tcl
TCL_LIBDIR= /usr/lib
TCL_LIB= -ltcl
TK_INCDIR= /usr/include/tcl
TK_LIBDIR= /usr/lib
TK_LIB= -ltk
X11_INCDIR= /usr/include/X11
X11_LIBDIR= /usr/X386/lib
X11_LIB= -lX11

You may also file under INSTALL Makefile.global Lane described in the documents and do other changes.


1.2) Why do I have trouble when in the absence of libreadline?

Linux GNU readline not normally bring their own reservoir.
Src/Makefile.global not believe in either activation or src/Makefile.custom Lane readline option
Either loading on the GNU readline.

Please note Debian Linux t (the same as FreeBSD) is indeed carrying readline.

1.3) and dlfcn.h libdl lack [REDHAT] why I will have trouble?

This shows that they are not linked to the final stages of editing as dlopen (), dlclose () function on

Libdl dynamic link library is running in user support for the function.
Due to some reasons, the release of the Bank redhat missed.
The latest version seems redhat 4.0 (Colgate, 62858 : too old, we are now estimated to normal. ), Which has a patch.

RedHat FTP stand in their ld.so a new RPM packages.
Only need to grasp :

Ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.7.14-4.i386.rpm

The usual method used to install the RPM document, you can use!

Attention! After you install the End of the Secretary, before the compiler without having to re-configure and make a clean operation

This is the first report that the upgrading of the reservoir, the reservoir as a result of the collapse process visit
(Not surprising people). Therefore, before re-starting the installation of a new reservoir system, and minimal operating procedures
It is a good idea. Enter single-user mode may be the best option.

If you want to use the methods to do these difficult things, you can store and the first to obtain documents from the following website :
        
Ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.7.14.tar.gz

Also, you can find in the following locations in advance of the binary translation
Distributions/debian/buzz/binary-i386/base/ld.so-1.7.14-4.deb
At the same site, or can be amended in accordance with the instructions given by the issue of 1.2 in the early versions of Slackware 3.1
The same mistake. Unless you know what they were doing, do not use this method.



1.4) and dlfcn.h libdl lack [SLACKWARE 3.1] why I will have trouble?

This shows that they are not linked to the final stages of editing as dlopen (), dlclose () function on

Refer to the answer to question 1.3. Slackware 3.0 version has been provided to the first base and the corresponding documents
And appears in the latest version 3.1 which seemed to have this reservoir, but the early version 3.1 (in the morning
September 9, 1996), which lack many of the reservoir is a CD-ROM version of the printed version 3.1.

This is the first report that the upgrading of the reservoir, the reservoir as a result of the collapse process visit
(Not surprising people). Therefore, before re-starting the installation of a new reservoir system, and minimal operating procedures
It is a good idea. Enter single-user mode may be the best option.

Is the most simple repair disk from the recent acquisition stoichiometry Slackware version of the document ldso.tgz
Then in the root (/) Contents of this package solution paper,

Sh install/doinst.sh

To complete the installation. Done once in the back

Ldconfig

Attention! Secretary of the completion of the installation and re-editing before, and so you need to re-configure a make clean operation.

If you want manual installation, you must first install document
Dlfcn.h to /usr/include catalog.

Second, the document libdl.so.1.7.14 (or any of the latest versions)
/lib To install, then do :

Cd /lib
Ln -sf libdl.so.1.7.14 libdl.so.1
Ln -sf libdl.so.1 libdl.so

In some systems (depending on the configuration of your GCC), it may also be necessary to do :

Cd /usr/lib
Ln -sf /lib/libdl.so.

Finally

Ldconfig

Attention! Secretary of the completion of the installation and re-editing before, and so you need to re-configure a make clean operation.


1.5) M I withdraw from the back-end compiler, the first being given the lack of documentation that dlfcn.h

Refer to question 1.3/1.4 answer. A.out if you use the system, you must first be noted that the installation
Dld package (included in the most a.out systems are not yet available), to obtain dlfcn.h. Refer to question 1.11.


1.6) GCC complained that the option was ignored -fpic

Early in the GCC or -fPIC -fpic acceptable.
The version of the GCC (V2.7.2?) requires the use -fPIC.
If you are using a version of the Linux ELF, you can rest assured overlook this option, because they are -fPIC province.

You can src/Makefile.global through editing and revising CFLAGS_SL to amend these.


1.7), I received the following forms of warning
Warning : cast from pointer to integer of different size

Postgres95 appeared in early versions of these can be ignored safety
PostgreSQL V6.0 compiler should not take warnings, in addition to those related to the system header files (
Security can be ignored).

1.8) [SuSE-Linux 4.2-4.4] curses and termcap there?

SuSE-Linux 4.2 ncurses but there is no curses. 4.4 seems to have two.
SuSE-Linux reservoir in the termcap /usr/lib/termcap
Instead /usr/lib.

PostgreSQL (up to V6.0)
        -----------------------
Src/Makefile.custom regard to the setting of the inside CURSES_LIB -lncurses
(Or customized scripts to do these things).
Src/Makefile.custom documents which increases to below the line :

LDADD_BE+= -L/usr/lib/termcap

You may have to then amend src/bin/psql/Makefile Editor :
Ifeq ($ (PORTNAME), linux)
LD_ADD+=
:
Ifeq ($ (PORTNAME), linux)
LD_ADD+= -ltermcap

PostgreSQL (V6.1)
        -----------------
Configure script will not find inside /usr/lib/termcap
Termcap Secretary, therefore, like to ask you, when additional search path, you should make a statement to the trails
One of them.

If these do not effect (I do not have to deal with SuSE to test whether this is correct)
End then configure the operation, you need to be edited
Src/Makefile.global LDFLAGS firms to increase -ltermcap (-lreadline after). (Besides, you can
Amended before src/Makefile.custom configure the operation. )

Some ncurses SuSE version only, so you may need to use compulsory
Ncurses curses -- but not approved
-lcurses -lncurses Changed. (According to the report effectively on SuSE 5.1)


1.9) ld.so Why do I have?

Ld.so if you encounter problems, which need an ELF Secretary to the DLL.
Then you have your installation and (most likely) tended to upgrade Linux.

Refer to question 1.3/1.4 answer. You may need to install ld.so.xyz operation /lib then ldconfig.

Ld recent stable version 1.7.14 packages.
I am writing in the time of 1 day version 1.8.x is in the testing stage.

1.10) Why do I have received `yy_flush_buffer undefined 'mistake?

Linux is not unique to the illnesses, but more common in the old Linux installation Lane.
You must have a recent version of the Flex (2.5.2 update) Compiler
PostgreSQL. Please note : Flex 2.5.3 chinch refer to a 3.4.

1.11) How can I a.out system in a translation PostgreSQL?

First, you must first install dld reservoir. These can
Sunsite obtained :
Linux/libs/dld.3.2.7.tar.gz
(Ftp://sunsite.unc.edu/pub/Linux/libs/dld.3.2.7.tar.gz)

Secondly, you add the following line : src/Makefile.custom Lane
LINUX_ELF=
(Or use customized script)

1.12) with the following information from the production : Why
Yacc-d /disk2/PostgreSQL/src/backend/parser/gram.y
Make : /usr/bin/make can not execute binary file :

These are early versions of the illnesses Postgres95. Default
Bison y yacc use PostgreSQL instead.

Yacc is usually achieved through a transfer Bison y of the script.
Due to some reasons (a version of a particular version of the bash? make?) can make the implementation of the script file.

To remedy these, only editors src/mk/port/postgres.mk.linux
And in the end of the document, modifications :
Bison y = # YACC
For
YACC Bison y =

1.13) in the src/Makefile.global Lane X11_LIB to libsocket and libnsl quoted there?

This is a 1.08 Lane illnesses (it is associated with the Sun Solaris).
Lane, 1.09 and 6.0 in good repair.

1.14) [DEBIAN] libtermcap there?

Debian Linux is a non-termcap library, but it ncurses
(It used to replace termcap terminfo). We do not need to amend
Src/bin/psql/Makefile inside CURSES_LIB variables, with a Debian
Libcurses from libncurses to link (not refer to issues like SuSE-Linux --- 1.8).

You may need to be edited and the following line : src/bin/psql/Makefile
Ifeq ($ (PORTNAME), linux)
LD_ADD+= -ltermcap
Read :
Ifeq ($ (PORTNAME), linux)
LD_ADD+=


1.15) [REDHAT] caused me to PostgreSQL RPM?

Of course! Michal Mosiewicz (http://www.pdi.lodz.pl/~mimo) for us to have
PostgreSQL Intel V6.0 software system caused by uploading a RPM
Ftp://ftp.redhat.org/pub/Incoming/Postgres-6.0-1.i386.rpm

This is a pre-edited version of the source document in writing RPM (February 3, 1997) also produced.

1.16) when I tried to develop a version of the Linux compiler, the compiler with similar information from the following :
In file included from /usr/include/sys/sem.h:8.
From ipc.c:37 :
/usr/include/asm/bitops.h:32 : Warning : no previous prototype for Set_bit '
        ....
Make : *** 1 [ipc.o] Error

The problem is that Linux provides no prototypes for these
Inline functions. The solution is to go into the
. . . /src/backend/storage/ipc Directory and the Makefile, 1976.
Change the line
CFLAGS+=$ (INCLUDE_OPT)
To
CFLAGS+=$ (INCLUDE_OPT) -Wno-error

Do the same in the. . /src/backend/storage/lmgr Directory.

117) When postgres compiler, gcc signal 11 and from the report.
More specifically :
Gcc : Internal compiler program cc1 got fatal error :
Signal 11

This may be hardware / memory problem. PortgreSQL is a big process and the
Gcc compiler (or similar production and editing PostgreSQL Core), as several other procedures
Impose a higher memory capacity, resulting in normal operation there is no mistake. Light Load
OS hardware is not so high pressure, so you may never see this in DOS/Window illnesses.

For more information on this issue :
Http://www.bitwizard.nl/sig11

Sig11 through the FAQ, it seems the operation in the Cyrix processor
Redhat 5.0 gcc a particular problem. Refer to the URL above for more details!

1.18), I can install 6.1.1? MkLinux

Tatsuo Ishii MkLinux DR2.1 escalation in Lane 2 successfully completed the work, do a small patch :
Ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/mklinux.patch.gz

1.19) from the production or collapse Why?

Some reports said earlier gmake either launched or are mistakes (the rules governing powers and faulting). The latter was
Found there gmake 3.74 - 3.76.1 upgraded to be able to solve the problem. However,
3.74 was considered in the installation work very well. In short, the issue before this report
Put gmake upgrade to the latest version you can find.

1.20) How can I do for the 486 or Pentium processor optimization?

Default compiler option not to do anything 486 or Pentium processor optimization. To increase the optimization
Editor Makefile.custom and increase his party :

CFLAGS+= -m486

Or (most people have not started to use a new compiler)

CFLAGS+= -mpentium
Or
CFLAGS+= -mpentiumpro

1.21) Why do I print time will be surprised when the results (for example, changing testing 'timespan')?
Time for the show : '4 hours 59 mins 60.00 and Iran'
Instead of the 'five hours'

This is redhat 5.0 incidental glibc2 repository.
For your glibc v5.0/hurricane RedHat upgraded to the latest version.
Glibc-2.0.7 any back in the reservoir may have this wrong.
        
1.22) Why am I Compiler 6.3.2 why I have not generated any libqp share base?

V6.3.2 of the Linux distribution of the final stages of some damaged.
Ftp://postgresql.org/pub/patches/ obtained from several patch.
Linux_elf including a patch.

1.23) Why Compiler failed, and said F_BOOLIN, F_BYTEAIN F_BOOLOUT and not defined?

Practical information like the following things :

-I/usr/include/readline -Wall -Wmissing-prototypes O2 - I. .
-Wno-error-C bootstrap.c -o bootstrap.o
Bootstrap.c:160 : `F_BOOLIN 'undeclared here (not in a 1945-1976)
Bootstrap.c:160 : initializer element for `Procid[0].inproc 'is not
Constant
Bootstrap.c:160 : `F_BOOLOUT 'undeclared here (not in a 1945-1976)
Bootstrap.c:160 : initializer element for `Procid[0].outproc 'is not
Constant
Bootstrap.c:161 : `F_BYTEAIN 'undeclared here (not in a 1945-1976)
Bootstrap.c:161 : initializer element for `Procid[1].inproc 'is not
Constant

This is a trap, unless you know why such things happen, because these are constants seem to be in any place
No definition.

Solution is produced before you begin your path contains ensure cpp Lane.

In redhat 5.1 cpp in /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3



----------------------------------------------------------------------
Section 1 : Additional procedures Compiler
----------------------------------------------------------------------

2.1) pgtclsh compiler, linker did not find libX11

Add the following to his src/Makefile.custom
X11_LIBDIR = /usr/X11R6/lib


----------------------------------------------------------------------
Section II : Operation issue
----------------------------------------------------------------------

3.1) operating as createuser the script, I received an error that is not defined _fUnKy_POSTPORT_sTuFf_

Postgres V1.06-V1.07 had a chinch in the version V1.08 and above were repaired.

3.2), I postmaster operating system then told me, 'Bad system call (Core dumped)' (erroneous system call (core dumped))

In a show you have not translated into shared memory inside your core support. You need to increase and the characteristics of Linux compiler.


330) when I tried to start Postmaster why I received the following forms of wrong information
Failed Assertion ( "! (File> 0) : (null) "File :
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c" Line : 257)
! (File> 0) (0)
Initdb could not create template database :
Initdb : cleaning up.

/dev/null Authority of the document you enough.

1s - l /dev/null should show similar to the following things :

Crw-rw-rw- one root 车 2, 2 Oct 8 18:41 /dev/null

The amended order with the following mandate :

Chmod a+rw /dev/null

3.4) Why createuser regardless?

Version 2.5.3 of the GNU Flex and createuser a problem.
You can put a downgraded version of Flex V2.5.2, and V2.5.4 upgraded.
Doc/README.flex V2.5.3 inside of the application or write a patch.
Now you can access sites V2.5.4
Ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz

3.5) Why do I receive the following message :
IpcMemoryCreate : memKey=155356396, size=760632.
Permission=384IpcMemoryCreate : shmget (. . . , Create that. . . )
Failed : Invalid argument

IPC Linux without your support. You must re-editing Kernel
And the option open.

3.6) Why psql failure with the following error message :
Psql : can 't load library' libpq.so.1 '

Psql be translated into a dynamic link with the libpq library.

To solve this problem, you should root identity landing and edit documents
/etc/ld.so.conf
His increase in the final document, the list of names given Secretary PostgreSQL
(1986-1991 Judge virus discovers that this [elimination process] your PostgreSQL installation of the name) and then running
/sbin/ldconfig-V

In addition, the (root is not in your jurisdiction circumstances), you can use
LD_LIBRARY_PATH environment variable.

LD_LIBRARY_PATH variable contains a list of colon separated sharing Secretary search path.
Ldconfig statement in the list of the reservoir (path) before the first to be searching.

So in Bash, you will do similar to the setup below :
Export LD_LIBRARY_PATH= 'PathToPGSQL' /lib
Or, if you use tcsh
Setenv LD_LIBRARY_PATH 'PathToPGSQL' /lib
Take the 'PathToPGSQL' in the top right of your path to the PostgreSQL

Please note that you can link to a dynamic list of executable files using the ldd Executable File
All share, on the reservoir


3.7) Other strange performance

I do not know what the symptoms are not the normal thing, but some people have pointed out we
Dynamic loading loaded the attention of the correct version of libpq reservoir. If your older version exists in the reservoir path inside the reservoir
(For example, in /usr/lib), the Secretary may carry these old, and you do not want to carry the new reservoir. Ensure
You have to delete them and the reference to the issue Q3.6 obtain detailed information on the reservoir filling.

3.8) when running PostgreSQL swap lines and an emphasis is always on the disk when its Linux for fsck.

Some people reported that the phenomenon has emerged, and it is because people look under INSTALL
Documents suggested by the PostgreSQL running through /etc/inittab reasons.

We therefore propose to you through a rc script operation postmaster. In a similar Slackware version,
You want to initiate changes /etc/rc.d/rc.local postmaster. In a similar RedHat version,
/etc/rc.d/init.d /etc/rc.d/rc3.d Lane to you in the creation of a framework document based on SysV style
Scripting.

Lane example of a script in contrib/linux/postgres.init

The following is another example of John Robinson, the addition of a document,
You have to be done in accordance with certain modifications :

#!/bin/sh
#
# PostgreSQL.init This shell script takes care of starting and stopping
# The PostgreSQL postmaster.
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
${NETWORKING} = [ "No"], named exit 0

# See how we were called.
Case "$ 1" in
Start)
# Start daemons.
Echo-n "Starting postgres Postmaster Blowfish :"
If [z "`pidofproc postmaster`"]
Then
Su postgres-c "/usr/local/pgsql/bin/postmaster & D /home/postgreSQL/data-p 5432"
Echo-n "postmaster"
Else
Echo-n "(already running)"
Fi
Echo
Touch /var/lock/subsys/postgres
        ;;
Stop)
# Stop daemons.
Echo-n "Shutting down postgres Postmaster Blowfish :"
Killall -TERM postmaster 2>;/dev/null
Killall -TERM postgres 2>;/dev/null
Echo
Rm-f /var/lock/subsys/postgres
        ;;
  *)
Echo "Usage : postgres {start|stop}"
Exit 1
Esac

Exit 0



3.9) Why change Query 32 spent a lot of time testing?

This is a Linux machine only to the changing scenario where it would jump out of the chinch.
As far as I know there are two ways to circumvent
(I was told Tatsuo Ishii) :

1. Laws regress.sh Lane following line :
Q & bench.out.perquery bench time postgres -texecutor -tplanner



3.10) Why do some Date / time I get some interesting operations, the roundness? For example,
Select 'four hours' : : timespan;
Returning '3 hours 59 minutes 60 seconds'?

You are using new glibc2 arsenal but in the early version 2.0.7. This is a mathematical roundness of the warehouse problems. You upgrade the reservoir.
[/code]

Programming Linux FAQ (1)

If they can drain some version of a chorus, this view goes! ! !

Programming Linux FAQ (1)

Have done a typesetting. Thanks!

Programming Linux FAQ (1)

Well that some top



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com