delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/18/18:47:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: Yes, hits=6.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Wed, 18 May 2011 18:47:35 -0400
Message-ID: <BANLkTint0SzMJBOq=gS9kpK6MWktuSKt6w@mail.gmail.com>
Subject: How does one make a bash "builtin" (shared loadable module) on cygwin
From: Rocky Bernstein <rocky AT gnu DOT org>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

=A0I am trying to build a bash "builtin" (a dynamically loadable bash
module) on cygwin. Here's the error message I get via automake/make:
$ make
gcc =A0-g -O2 =A0 -o set0.exe -shared set0-set0.o
set0-set0.o: In function `set0_builtin':
/tmp/bashdb/builtin/set0.c:46: undefined reference to `_builtin_error'
/tmp/bashdb/builtin/set0.c:47: undefined reference to `_builtin_usage'
/tmp/bashdb/builtin/set0.c:51: undefined reference to `_dollar_vars'
/tmp/bashdb/builtin/set0.c:52: undefined reference to `_xmalloc'
/tmp/bashdb/builtin/set0.c:52: undefined reference to `_dollar_vars'
/tmp/bashdb/builtin/set0.c:42: undefined reference to `_builtin_error'
/tmp/bashdb/builtin/set0.c:43: undefined reference to `_builtin_usage'
collect2: ld returned 1 exit status
make: *** [set0.exe] Error 1
The complete Makefile.am and code is listed at
http://bashdb.git.sourceforge.net/git/gitweb.cgi?p=3Dbashdb/bashdb;a=3Dtree=
;f=3Dbuiltin;h=3D428fd8f3598c88eabb10b3ba800fb900da9f858c;hb=3DHEAD

Perhaps I need to tell cygwin that these symbols are supposed to be
undefined since they are part of bash?
I've tried looking at gcc documentation for linker options but it's
all a mystery to me.
Thanks in advance for help, suggestions or links to documentation.
Regards,
=A0 =A0rocky

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019