sK1 Project :: OpenSource Solutions for Prepress
View Thread
 Print Thread
How can I install sk1libs in Mac OS X?
zhaoxitao
#1 Print Post
Posted on 02-06-2011 02:56
Member

Posts: 5
Joined: 02.06.11

Hello.
I com form China, so my English is not good~~

i want install UniConvertor in my Macintosh,the first I install sk1libs,but i had got this error:
Download source  Code

$ sudo env ARCHFLAGS="-arch i386" python setup.py install
running install
running build
running build_py
running build_ext
building 'sk1libs.pycms._pycms' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch i386 -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/pycms/_pycms.c -o build/temp.macosx-10.6-fat-2.6/src/pycms/_pycms.o -Wall
src/pycms/_pycms.c:21:18: error: lcms.h: No such file or directory
src/pycms/_pycms.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getLCMStype’
src/pycms/_pycms.c: In function ‘pycms_OpenProfile’:
src/pycms/_pycms.c:74: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:74: error: (Each undeclared identifier is reported only once
src/pycms/_pycms.c:74: error: for each function it appears in.)
src/pycms/_pycms.c:74: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:79: warning: implicit declaration of function ‘cmsErrorAction’
src/pycms/_pycms.c:79: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:81: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:81: warning: implicit declaration of function ‘cmsOpenProfileFromFile’
src/pycms/_pycms.c:88: error: ‘cmsCloseProfile’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_CreateRGBProfile’:
src/pycms/_pycms.c:94: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:94: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:96: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:98: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:98: warning: implicit declaration of function ‘cmsCreate_sRGBProfile’
src/pycms/_pycms.c:105: error: ‘cmsCloseProfile’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_CreateLabProfile’:
src/pycms/_pycms.c:111: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:111: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:113: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:115: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:115: warning: implicit declaration of function ‘cmsCreateLabProfile’
src/pycms/_pycms.c:122: error: ‘cmsCloseProfile’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_CreateGrayProfile’:
src/pycms/_pycms.c:128: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:128: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:129: error: ‘LPGAMMATABLE’ undeclared (first use in this function)
src/pycms/_pycms.c:129: error: expected ‘;’ before ‘gamma’
src/pycms/_pycms.c:131: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:133: warning: implicit declaration of function ‘cmsBuildGamma’
src/pycms/_pycms.c:133: error: lvalue required as left operand of assignment
src/pycms/_pycms.c:134: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:134: warning: implicit declaration of function ‘cmsCreateGrayProfile’
src/pycms/_pycms.c:134: warning: implicit declaration of function ‘cmsD50_xyY’
src/pycms/_pycms.c:135: warning: implicit declaration of function ‘cmsFreeGamma’
src/pycms/_pycms.c:142: error: ‘cmsCloseProfile’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_BuildTransform’:
src/pycms/_pycms.c:152: error: ‘DWORD’ undeclared (first use in this function)
src/pycms/_pycms.c:152: error: expected ‘;’ before ‘flags’
src/pycms/_pycms.c:155: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:155: error: expected ‘;’ before ‘hInputProfile’
src/pycms/_pycms.c:156: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:156: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:162: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:164: error: ‘hInputProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:164: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:165: error: ‘hOutputProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:165: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:166: error: ‘flags’ undeclared (first use in this function)
src/pycms/_pycms.c:166: error: expected ‘;’ before ‘inFlags’
src/pycms/_pycms.c:168: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:168: warning: implicit declaration of function ‘cmsCreateTransform’
src/pycms/_pycms.c:168: warning: implicit declaration of function ‘getLCMStype’
src/pycms/_pycms.c:176: error: ‘cmsDeleteTransform’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_BuildProofingTransform’:
src/pycms/_pycms.c:187: error: ‘DWORD’ undeclared (first use in this function)
src/pycms/_pycms.c:187: error: expected ‘;’ before ‘flags’
src/pycms/_pycms.c:192: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:192: error: expected ‘;’ before ‘hInputProfile’
src/pycms/_pycms.c:193: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:193: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:200: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:202: error: ‘hInputProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:202: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:203: error: ‘hOutputProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:203: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:204: error: ‘hProofingProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:204: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:205: error: ‘flags’ undeclared (first use in this function)
src/pycms/_pycms.c:205: error: expected ‘;’ before ‘inFlags’
src/pycms/_pycms.c:207: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:207: warning: implicit declaration of function ‘cmsCreateProofingTransform’
src/pycms/_pycms.c:215: error: ‘cmsDeleteTransform’ undeclared (first use in this function)
src/pycms/_pycms.c: In function ‘pycms_SetAlarmCodes’:
src/pycms/_pycms.c:227: warning: implicit declaration of function ‘cmsSetAlarmCodes’
src/pycms/_pycms.c: In function ‘pycms_TransformPixel’:
src/pycms/_pycms.c:239: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:239: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:246: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:254: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:254: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:256: warning: implicit declaration of function ‘cmsDoTransform’
src/pycms/_pycms.c: In function ‘pycms_TransformPixel2’:
src/pycms/_pycms.c:270: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:270: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:277: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:285: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:285: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c: In function ‘pycms_TransformBitmap’:
src/pycms/_pycms.c:303: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:303: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:310: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:315: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:315: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c: In function ‘pycms_GetProfileName’:
src/pycms/_pycms.c:329: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:329: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:335: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:337: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:337: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:339: warning: implicit declaration of function ‘cmsTakeProductDesc’
src/pycms/_pycms.c: In function ‘pycms_GetProfileInfo’:
src/pycms/_pycms.c:346: error: ‘cmsHPROFILE’ undeclared (first use in this function)
src/pycms/_pycms.c:346: error: expected ‘;’ before ‘hProfile’
src/pycms/_pycms.c:352: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:354: error: ‘hProfile’ undeclared (first use in this function)
src/pycms/_pycms.c:354: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
src/pycms/_pycms.c:356: warning: implicit declaration of function ‘cmsTakeProductName’
src/pycms/_pycms.c: In function ‘pycms_TransformPixels’:
src/pycms/_pycms.c:413: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
src/pycms/_pycms.c:413: error: expected ‘;’ before ‘hTransform’
src/pycms/_pycms.c:419: error: ‘LCMS_ERROR_IGNORE’ undeclared (first use in this function)
src/pycms/_pycms.c:421: error: ‘hTransform’ undeclared (first use in this function)
src/pycms/_pycms.c:421: error: expected ‘;’ before ‘PyCObject_AsVoidPtr’
error: command 'gcc-4.2' failed with exit status 1




my OS version is 10.6.7
my Xcode version is 4.0.1
my gcc version is 4.2.1
my python version is 2.6
i was installed freetype jpeg lcms zlib wiht MacPorts,
the install code by:
Download source  Code

sudo port install lcms
sudo port install jpeg
sudo port install freetype




so i want know How can i install sk1libs in Mac OS X?
 
zhaoxitao
#2 Print Post
Posted on 03-06-2011 03:58
Member

Posts: 5
Joined: 02.06.11

i was fix the error by maself,haha, i installed sk1libs and uniconvertor whit no error,but i had an new error now
Download source  Code

zhaoxitao$ uniconvertor 1.cdr 1.ai
Traceback (most recent call last):
  File "/usr/local/bin/uniconvertor", line 13, in <module>
    uniconv_run()
  File "/Library/Python/2.6/site-packages/uniconvertor/__init__.py", line 83, in uniconv_run
    from app.io import load
  File "/Library/Python/2.6/site-packages/uniconvertor/app/__init__.py", line 69, in <module>
    from conf.configurator import Configurator
  File "/Library/Python/2.6/site-packages/uniconvertor/app/conf/configurator.py", line 11, in <module>
    from app.events import connector
  File "/Library/Python/2.6/site-packages/uniconvertor/app/__init__.py", line 72, in <module>
    from managers.colormanager import ColorManager
  File "/Library/Python/2.6/site-packages/uniconvertor/app/managers/colormanager.py", line 9, in <module>
    from sk1libs.pycms import cmsOpenProfileFromFile,cmsCreateTransform,cmsDoTransform, \
  File "/Library/Python/2.6/site-packages/sk1libs/pycms/__init__.py", line 22, in <module>
    import _pycms, os, types
ImportError: dlopen(/Library/Python/2.6/site-packages/sk1libs/pycms/_pycms.so, 2): Symbol not found: _cmsCloseProfile
  Referenced from: /Library/Python/2.6/site-packages/sk1libs/pycms/_pycms.so
  Expected in: flat namespace
 in /Library/Python/2.6/site-packages/sk1libs/pycms/_pycms.so





how can i fix this error?
 
igor
#3 Print Post
Posted on 03-06-2011 11:04
User Avatar

Super Administrator

Posts: 220
Joined: 09.02.09

Hi!

The problem cause is an absence of LCMS library headers:

src/pycms/_pycms.c:21:18: error: lcms.h: No such file or directory


It seems incorrect extension build produces corrupted _pycms.so extension and this is a reason of runtime exception:

ImportError: dlopen(/Library/Python/2.6/site-packages/sk1libs/pycms/_pycms.so, 2): Symbol not found: _cmsCloseProfile


i.e. this extesion is not linked to lcms.so

To fix problem just install LCMS headers and recompile the package.
Regards,

Igor Novikov
sK1 Project
 
zhaoxitao
#4 Print Post
Posted on 11-06-2011 03:06
Member

Posts: 5
Joined: 02.06.11

OK&#65292;thank u very mach, i thy later...
 
Jump to Forum: