Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Solaris 11/Sparc #97

Closed
iav opened this issue Jan 12, 2017 · 3 comments
Closed

Build error on Solaris 11/Sparc #97

iav opened this issue Jan 12, 2017 · 3 comments

Comments

@iav
Copy link

iav commented Jan 12, 2017

I got ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz and try to build it on Solaris 11-sparc.
run ./configure --disable-server --disable-pool
make finished with error

  CCLD     libct.la
../../libtool[1721]: eval: syntax error at line 1: `|' unexpected
*** Error code 3
The following command caused the error:
echo "  CCLD    " libct.la;/bin/sh ../../libtool --silent --tag=CC    --mode=link gcc -D_REENTRANT -pthreads -g -O2   -Wdeclaration-after-statement  -version-info 4:0:0 -Wl,-Bsymbolic  -export-symbols-regex '^(cs_|ct_|blk_).*'  -o libct.la -rpath /usr/local/lib ct.lo cs.lo blk.lo ctutil.lo  ../tds/libtds.la ../replacements/libreplacements.la
make: Fatal error: Command failed for target `libct.la'
Current working directory /users/iav/freetds-1.00.24/src/ctlib
*** Error code 1
The following command caused the error:
fail=; \
if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_with_option: internal error: invalid"  "target option '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;  sane_makeflags=$MAKEFLAGS;  if {  if test -z '2'; then  false;  elif test -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else  false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in  *\\[\ \      ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  | sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;  strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };  for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no; continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I'; skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O'; skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l'; skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;  -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*) has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
  failcom='fail=yes'; \
else \
  failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
  distclean-* | maintainer-clean-*) list='. unittests' ;; \
  *) list='. unittests' ;; \
esac; \
for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /users/iav/freetds-1.00.24/src/ctlib
*** Error code 1
The following command caused the error:
fail=; \
if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_with_option: internal error: invalid"  "target option '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;  sane_makeflags=$MAKEFLAGS;  if {  if test -z '1'; then  false;  elif test -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else  false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in  *\\[\ \      ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  | sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;  strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };  for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no; continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I'; skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O'; skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l'; skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;  -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*) has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
  failcom='fail=yes'; \
else \
  failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
  distclean-* | maintainer-clean-*) list='replacements tds ctlib dblib     apps odbc' ;; \
  *) list='replacements tds ctlib dblib     apps' ;; \
esac; \
for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /users/iav/freetds-1.00.24/src
*** Error code 1
The following command caused the error:
fail=; \
if (target_option=k; case ${target_option-} in  ?) ;;  *) echo "am__make_running_with_option: internal error: invalid"  "target option '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;  sane_makeflags=$MAKEFLAGS;  if {  if test -z ''; then  false;  elif test -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else  false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in  *\\[\ \       ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  | sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;  strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };  for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no; continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I'; skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O'; skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l'; skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;  -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*) has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
  failcom='fail=yes'; \
else \
  failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
case "all-recursive" in \
  distclean-* | maintainer-clean-*) list='include src doc samples win32 vms misc' ;; \
  *) list='include src doc samples win32 vms misc' ;; \
esac; \
for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'

How to build it right?

@iav
Copy link
Author

iav commented Jan 17, 2017

Error occurs because $global_symbol_pipe var is empty and then | | occures in line 409 of libtool:

# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"

It means $global_symbol_pipe should not be empty or should remove | if it empty from $export_symbols_cmds string

But libtool file generated by autogen. Then - where and how to fix it?

@iav
Copy link
Author

iav commented Jan 17, 2017

Found similar error gperftools/gperftools#385
Now I set PATH=/usr/gnu/bin:/usr/local/bin:/usr/bin (add /usr/gnu/bin first) and now after autoget it is
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"

@iav iav closed this as completed Jan 18, 2017
@iav
Copy link
Author

iav commented Jan 18, 2017

Solution: add /usr/gnu/bin to the start of $PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant