Opened 11 years ago

Closed 4 years ago

#38951 closed defect (fixed)

rdesktop +smartcard: Undefined symbols: "_SCARD_CTL_CODE"

Reported by: cheongi Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: ritchymad@…, chrstphrchvz (Christopher Chavez)
Port: rdesktop

Description (last modified by mf2k (Frank Schima))

Trying to build rdesktop +smartcard on Snow Leopard. Only two errors.

  1. trying to look for lib64, which apparently does not exist on MacOS

fudged past that one by making a symlink /opt/local/lib64->/opt/local/lib

  1. missing symbols ??from pcsc-lite
    :info:build Undefined symbols:
    :info:build   "_SCARD_CTL_CODE", referenced from:
    :info:build       _TS_SCardControl in scard.o
    :info:build       _TS_SCardControl in scard.o
    :info:build ld: symbol(s) not found
    

I had been playing around with various fixes including some suggestions found that rdesktop 1.6.x worked and grafting in some code from scard.c from 1.6 https://discussions.apple.com/message/15301873#15301873

Previous to try rdesktop, I had been trying FreeRDP without success. So I did manage to get rdesktop +smartcard to build...

$ sudo port install rdesktop +smartcard
Password:
--->  Computing dependencies for rdesktop
--->  Building rdesktop
--->  Staging rdesktop into destroot
--->  Installing rdesktop @1.7.1_0+smartcard
--->  Activating rdesktop @1.7.1_0+smartcard
--->  Cleaning rdesktop
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

And I could talk to RDP server with smartcard showing up. In trying to document what the fix was, I cleaned out the macports install and tried to replicate the necessary parts and can't get it to work again yet : (

Change History (11)

comment:1 Changed 11 years ago by cheongi

Have rolled back to 1.6 rev 83402. All seems fine with smart card support.

(sorry about formatting of first post)

comment:2 Changed 11 years ago by cheongi

Further testing reveals some problems with rdesktop 1.6 rev 83402:

  1. Smart card availability seems to have compatibility issues. Card will talk to SafeSign token administration utility using Gemalto card reader., but not to Gemalto SmartDiag or Safesign.
  2. Keyboard has intermittent hangs for several seconds.

Since 1.7.1 is meant to be better with Win 2008R2 and 64 bit, I will try again to get it to build...

comment:3 Changed 11 years ago by cheongi

Minimal fix to get rdesktop 1.7.1 + smartcard to build. Seems to still recognise smart card at least partially for SafeSign token administration utility

  1. fudge to non-existent lib64 problem with:
    $ sudo ln -s /opt/local/lib /opt/local/lib64
    
  2. comment out part with missing symbols in scard.o. diff file content
--- 1.7.1-src/scard.c	2011-12-07 19:49:44.000000000 +1000
+++ irc-1.7.1-works/scard.c	2013-05-02 20:22:05.000000000 +1000
@@ -2152,7 +2152,9 @@
 	{
 		/* Translate to local encoding */
 		dwControlCode = (dwControlCode & 0x3ffc) >> 2;
-		dwControlCode = SCARD_CTL_CODE(dwControlCode);
+/*IRC try rid of this
+dwControlCode = SCARD_CTL_CODE(dwControlCode);
+*/
 	}
 	else
 	{
@@ -2197,6 +2199,7 @@
 		DEBUG_SCARD(("SCARD: -> Success (out: %d bytes)\n", (int) nBytesReturned));
 	}
 
+/* IRC try rid of this
 #ifdef PCSCLITE_VERSION_NUMBER
 	if (dwControlCode == SCARD_CTL_CODE(3400))
 	{
@@ -2214,6 +2217,7 @@
 		}
 	}
 #endif
+*/
 
 	out_uint32_le(out, nBytesReturned);
 	out_uint32_le(out, 0x00000004);

There is a reference to removing definition of SCARD_CTL_CODE in 2005 revisions of MacOS Smart Card Services. http://smartcardservices.macosforge.org/trac/browser/releases/Apple/OSX-10.7.0/SmartcardCCID-55000/ccid/ccid/ChangeLog

comment:4 Changed 11 years ago by mf2k (Frank Schima)

Description: modified (diff)
Owner: changed from macports-tickets@… to cshbell@…
Port: rdesktop added

In the future, please fill in the Port field and Cc the port maintainer(s).

comment:5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ritchymad@… added
Summary: rdesktop +smartcard errors on 10.6.8 64bitrdesktop +smartcard: Undefined symbols: "_SCARD_CTL_CODE"

Has duplicate #43110.

comment:6 Changed 10 years ago by ritchymad@…

It seems the same error is now in version 1.7.1_1 . Could please adjust for this version to fix the port for smartcard?

comment:7 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Is this issue still present in rdesktop 1.8.4?

comment:8 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:9 in reply to:  7 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Replying to chrstphrchvz:

Is this issue still present in rdesktop 1.8.4?

Actually, it turns out smartcard support was disabled for this port over 3 years ago: [b192e83fad/macports-ports]

comment:10 Changed 5 years ago by mf2k (Frank Schima)

Owner: cshbell@… deleted
Status: newassigned

comment:11 Changed 4 years ago by mf2k (Frank Schima)

Owner: set to mf2k
Resolution: fixed
Status: assignedclosed

In 9117105f3e90ca37c5c5f7c749875191f170c62d/macports-ports (master):

rdesktop: Whitespace fixes

  • Add missing dependencies

Remove unused dependency on openssl

  • Re-enable smartcard variant
  • De-tab
  • Reorder some lines
  • Alphabetize dependencies
  • Honor mode line

Closes: #38951

Note: See TracTickets for help on using tickets.