English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 29 December 2015, 15:29   #1
ciVic
Registered User
 
Join Date: Oct 2013
Location: Germany
Posts: 39
Crosscompiling with bsdsocket.library

Hi all,

I'm trying to compile curl 7.46 as I need some new features. I'm using the m68k-amigaos cross compiler on Mac OS. The libcurl.a is compiled but linking the curl executable itself fails:

Code:
CCLD     curl
curl-tool_getpass.o(.text+0x18): undefined reference to `tcgetattr'
curl-tool_getpass.o(.text+0xa0): undefined reference to `tcsetattr'
curl-tool_getpass.o(.text+0xba): undefined reference to `tcsetattr'
curl-tool_paramhlp.o(.text+0x22e): undefined reference to `strtod'
curl-tool_sleep.o(.text+0x30): undefined reference to `WaitSelect'
../lib/.libs/libcurl.a(libcurl_la-amigaos.o)(.text+0xae): undefined reference to `SocketBaseTags'
../lib/.libs/libcurl.a(libcurl_la-select.o)(.text+0x3a): undefined reference to `WaitSelect'
../lib/.libs/libcurl.a(libcurl_la-select.o)(.text+0x202): undefined reference to `WaitSelect'
../lib/.libs/libcurl.a(libcurl_la-select.o)(.text+0x490): undefined reference to `WaitSelect'
It seems that it is missing the bsdsocket.library functions. They cannot be found in any static library but how do I tell the compiler that it is found in the .library?
ciVic is offline  
Old 30 December 2015, 11:40   #2
cla
dev
 
cla's Avatar
 
Join Date: Aug 2014
Location: Copenhagen
Age: 48
Posts: 65
Send a message via ICQ to cla
Hi

tcgetattr and tcsetattr are (POSIX) termios functions. I have looked for an open source Amiga implementation of termios but never found one. You would need to implement those for AmigaDOS yourself.

strtod are an standard C90/C99 function. There are several open source implementations available.

WaitSelect is not in the original bsdsocket.library, but you can find it in AmiTCP or Roadshow. The same goes for SocketBaseTags. You need to link to one of those GCC Amiga specific libraries. Or use inline includes (look for something like "..netinclude/inline/socket.h").

strtod, WaitSelect and SocketBaseTags are easy to solve. tcgetattr and tcsetattr are a bit harder.

Add extra link libraries to GCC with option -L

Please tell if you get it to work

Last edited by cla; 30 December 2015 at 11:51.
cla is offline  
Old 30 December 2015, 17:49   #3
ciVic
Registered User
 
Join Date: Oct 2013
Location: Germany
Posts: 39
Thx, you're right, termios would be hard to reimplement and as I only need the lib I think porting or reimplementing it would be waste of time. Must be something new as older versions of curl were successfully ported.
ciVic is offline  
Old 31 December 2015, 03:06   #4
cla
dev
 
cla's Avatar
 
Join Date: Aug 2014
Location: Copenhagen
Age: 48
Posts: 65
Send a message via ICQ to cla
By coincidence I stumble across an implementation today. Its on github:
https://github.com/arczi84/NetSurf-6...migaos3/libnix

Maybe it can be of use.
cla is offline  
Old 01 January 2016, 09:43   #5
ciVic
Registered User
 
Join Date: Oct 2013
Location: Germany
Posts: 39
That looks promising. But, libnix, shouldn't it be within the libnix of my m68-amigaos-gcc?
ciVic is offline  
Old 01 January 2016, 10:55   #6
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
It is an updated version of the library.
Samurai_Crow is offline  
Old 05 January 2016, 11:56   #7
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
I took it from clib2 but it works.
arti is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
winuae bsdsocket.library clauddio support.WinUAE 5 21 July 2015 21:47
e-uae bsdsocket.library with tcpip servers (telnetd)?? GeoKM support.OtherUAE 6 09 August 2013 12:34
FS-UAE and Internet (bsdsocket.library) on Windows elowan support.FS-UAE 11 26 January 2013 20:37
Can't connect with bsdsocket.library error (WinUAE 2.5.0) arti support.WinUAE 12 13 December 2012 21:29
BSDSocket.library error with version 1.5+ Icreadence support.WinUAE 7 28 August 2008 04:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10617 seconds with 13 queries