bugSimulavr: an AVR simulator - Bugs: bug #38571, Link fails on Solaris

 
 

bug #38571: Link fails on Solaris

Submitter:  Steve Kappel <skappel>
Submitted:  Fri 22 Mar 2013 03:09:05 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Component Version:  * simulavr
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Feb 2014 05:41:30 AM UTC, comment #4: 

Hi,

no action here. If needed, please reopen again. Thanks!

cu, Thomas

Thomas K. <tomk>
Group administrator
Sun 24 Mar 2013 03:31:30 PM UTC, comment #3: 

I was unable to fully test because my autoconf install is apparently newer and there are lots of other issues that I don't want to pursue.

However, I tried Joerg's suggestion and the created Makefile now has the correct libraries for Solaris.

Since simulavr doesn't use inet_aton it might be better to replace it with inet_ntoa in the snippet.


Using the LDFLAGS approach it seems to work (debugging an Ada program no less) on Solaris (11.1 on x86_64).  It should work on any Solaris version including sparc.

Steve Kappel <skappel>
Sun 24 Mar 2013 08:58:18 AM UTC, comment #2: 

Hi Steve,

you should hold in mind, that solaris is a not tested platform! It looks so, that you're the first on it. (or the first, which post about it :-) )

Maybe you can try to add to AC_SEARCH_LIBS, like Joerg proposed. If this helps you, then write a comment, what do you have changed.

What solaris distribution do you use?

cu, Thomas

Thomas K. <tomk>
Group administrator
Fri 22 Mar 2013 03:18:46 PM UTC, comment #1: 


> I don't know enough about autoconf to recommend specific
> change to configure.ac to fix this (maybe AC_SEARCH_LIBS?).


configure.ac snippet from AVaRICE:


## Some systems need "-lsocket -lnsl" when linking.
##
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_CHECK_FUNC(socket, , [
    AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket", [
        AC_CHECK_LIB(nsl, socket, LIBS="$LIBS -lsocket -lnsl", , -lsocket)
    ], "$LIBS")
])

## Some systems need "-lresolv" for inet_aton().
##
AC_SEARCH_LIBS([inet_aton], [resolv])


Joerg Wunsch <joerg_wunsch>
Group administrator
Fri 22 Mar 2013 03:09:05 PM UTC, original submission:  

    libtool: link: g++ -I/scratch/builds/ada/run/include -g -O2 -Icmd -Iui -Ihwtimer -o simulavr main.o dumpargs.o .libs/adcpin.o .libs/application.o .libs/at4433.o .libs/at8515.o .libs/atmega668base.o .libs/atmega128.o .libs/at90canbase.o .libs/atmega8.o .libs/atmega1284abase.o .libs/atmega16_32.o .libs/attiny2313.o .libs/externalirq.o .libs/avrdevice.o .libs/avrerror.o .libs/avrfactory.o .libs/avrmalloc.o .libs/decoder.o .libs/decoder_trace.o .libs/flash.o .libs/flashprog.o .libs/hardware.o .libs/helper.o .libs/gdbserver.o .libs/hwacomp.o .libs/hwad.o .libs/hweeprom.o .libs/timerprescaler.o .libs/prescalermux.o .libs/timerirq.o .libs/hwpinchange.o .libs/hwport.o .libs/hwspi.o .libs/hwsreg.o .libs/icapturesrc.o .libs/hwstack.o .libs/hwtimer.o .libs/hwuart.o .libs/hwwado.o .libs/ioregs.o .libs/irqsystem.o .libs/keyboard.o .libs/lcd.o .libs/memory.o .libs/mysocket.o .libs/net.o .libs/pin.o .libs/extpin.o .libs/pinatport.o .libs/pinmon.o .libs/rwmem.o .libs/scope.o .libs/serialrx.o .libs/serialtx.o .libs/spisrc.o .libs/spisink.o .libs/specialmem.o .libs/string2.o .libs/systemclock.o .libs/traceval.o .libs/ui.o  -L/scratch/builds/ada/run/lib /export/scratch/builds/ada/run/lib/libbfd.a -lz -liberty
    Undefined                   first referenced
     symbol                         in file
    __xnet_connect                      .libs/mysocket.o
    __xnet_socket                       .libs/gdbserver.o
    accept                              .libs/gdbserver.o
    listen                              .libs/gdbserver.o
    setsockopt                          .libs/gdbserver.o
    inet_pton                           .libs/mysocket.o
    inet_ntoa                           .libs/gdbserver.o
    __xnet_bind                         .libs/gdbserver.o
    ld: fatal: symbol referencing errors. No output written to simulavr
    collect2: error: ld returned 1 exit status
    gmake[3]: * [simulavr] Error 1

Setting LDFLAGS to "-lsocket -lnsl" works.

I don't know enough about autoconf to recommend specific change to configure.ac to fix this (maybe AC_SEARCH_LIBS?).

Steve Kappel <skappel>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tomk (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by skappel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-24 tomk StatusPostponed Wont Fix
        Open/ClosedOpen Closed
    2013-03-24 tomk StatusNone Postponed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code