Thread

Commits

  1. Fix broken link-command-line ordering for libpgfeutils.

  1. BUG #14742: build fails on psql

    Chris Ruprecht <chris@cdrbill.com> — 2017-07-14T12:51:06Z

    The following bug has been logged on the website:
    
    Bug reference:      14742
    Logged by:          Chris Ruprecht
    Email address:      chris@cdrbill.com
    PostgreSQL version: 10beta2
    Operating system:   macOS 10.12.5
    Description:        
    
    The build fails at this point:
    
    gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
    -Wendif-labels -Wmissing-format-attribute -Wformat-security
    -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 command.o
    common.o conditional.o copy.o crosstabview.o describe.o help.o input.o
    large_obj.o mainloop.o prompt.o psqlscanslash.o sql_help.o startup.o
    stringutils.o tab-complete.o variables.o  -L../../../src/common -lpgcommon
    -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq
    -L../../../src/port -L../../../src/common -L/usr/local/lib 
    -Wl,-dead_strip_dylibs  -L../../../src/fe_utils -lpgfeutils -lpq  -lpgcommon
    -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
     -o psql
    Undefined symbols for architecture x86_64:
      "_appendShellStringNoError", referenced from:
          _psql_get_variable in common.o
      "_psql_scan_set_passthrough", referenced from:
          _MainLoop in mainloop.o
          _main in startup.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see
    invocation)
    
    Configure options are:
    
    ./configure  \
      --prefix=/usr/local              \
      --enable-integer-datetimes \
      --enable-thread-safety        \
      --with-perl             \
      --with-python           \
      --with-gssapi           \
      --with-openssl             \
      --with-pam              \
      --with-zlib             \
      --with-libxml         \
      --with-libxslt        \
      --with-uuid=e2fs      \
      --with-perl \
      --with-wal-segsize=64 \
      --with-wal-segsize=16 \
      --with-bonjour
    
    
    
    
  2. Re: BUG #14742: build fails on psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-07-14T14:22:07Z

    chris@cdrbill.com writes:
    > Undefined symbols for architecture x86_64:
    >   "_appendShellStringNoError", referenced from:
    >       _psql_get_variable in common.o
    >   "_psql_scan_set_passthrough", referenced from:
    >       _MainLoop in mainloop.o
    >       _main in startup.o
    
    appendShellStringNoError() and psql_scan_set_passthrough() should be in
    src/fe_utils/libpgfeutils.a, but they are both new as of v10.  I suppose
    you're somehow linking against a 9.6 or earlier version of that
    library.  Looking at the link line, -L/usr/local/lib is probably the
    source of the problem.  Do you have any idea how it got there?
    I don't see an equivalent reference to the --prefix lib directory
    when I do this, so it's not that.
    
    			regards, tom lane
    
    
    
  3. Re: BUG #14742: build fails on psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-07-14T16:33:34Z

    I wrote:
    > appendShellStringNoError() and psql_scan_set_passthrough() should be in
    > src/fe_utils/libpgfeutils.a, but they are both new as of v10.  I suppose
    > you're somehow linking against a 9.6 or earlier version of that
    > library.  Looking at the link line, -L/usr/local/lib is probably the
    > source of the problem.  Do you have any idea how it got there?
    > I don't see an equivalent reference to the --prefix lib directory
    > when I do this, so it's not that.
    
    On further consideration, however that got there, it's definitely a
    bug in our makefiles that the -L flag for src/fe_utils isn't being
    placed in front of -L flags for system libraries.  I've pushed a fix
    for that.  Thanks for the report!
    
    			regards, tom lane
    
    
    
  4. Re: BUG #14742: build fails on psql

    Chris Ruprecht <chris@cdrbill.com> — 2017-07-14T17:12:52Z

    Tom,
    
    That was the problem. There was a 9.6.3 version in /usr/local/lib.
    
    Thank you!!
    
    
    > On Jul 14, 2017, at 10:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > 
    > chris@cdrbill.com writes:
    >> Undefined symbols for architecture x86_64:
    >>  "_appendShellStringNoError", referenced from:
    >>      _psql_get_variable in common.o
    >>  "_psql_scan_set_passthrough", referenced from:
    >>      _MainLoop in mainloop.o
    >>      _main in startup.o
    > 
    > appendShellStringNoError() and psql_scan_set_passthrough() should be in
    > src/fe_utils/libpgfeutils.a, but they are both new as of v10.  I suppose
    > you're somehow linking against a 9.6 or earlier version of that
    > library.  Looking at the link line, -L/usr/local/lib is probably the
    > source of the problem.  Do you have any idea how it got there?
    > I don't see an equivalent reference to the --prefix lib directory
    > when I do this, so it's not that.
    > 
    > 			regards, tom lane
    
    
  5. Re: BUG #14742: build fails on psql

    Chris Ruprecht <chris@cdrbill.com> — 2017-07-14T17:14:48Z

    I was thinking the same thing, we should be able to build what ever release, regardless if there is a previous release already installed ;).
    
    
    > On Jul 14, 2017, at 12:33, Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > 
    > I wrote:
    >> appendShellStringNoError() and psql_scan_set_passthrough() should be in
    >> src/fe_utils/libpgfeutils.a, but they are both new as of v10.  I suppose
    >> you're somehow linking against a 9.6 or earlier version of that
    >> library.  Looking at the link line, -L/usr/local/lib is probably the
    >> source of the problem.  Do you have any idea how it got there?
    >> I don't see an equivalent reference to the --prefix lib directory
    >> when I do this, so it's not that.
    > 
    > On further consideration, however that got there, it's definitely a
    > bug in our makefiles that the -L flag for src/fe_utils isn't being
    > placed in front of -L flags for system libraries.  I've pushed a fix
    > for that.  Thanks for the report!
    > 
    > 			regards, tom lane