There are multiple versions of GLDv3, and unless you have the full 
headers (with the source), you won't be able to use GLDv3.  I would 
stick with the GLDv2 version for now -- until GLDv3 is public, all bets 
are off when using it.  (Unless the driver is bundled into ON.)

    -- Garrett

On 11/05/08 06:43, Piotr Jasiukajtis wrote:
> Hello,
>
> I get a problems with building a GLDv3 alta driver.
>
> $ /usr/ccs/bin/make
> gcc -c -O3 -D__INLINE__=inline -DGEM_GCC_RUNTIME -ffreestanding 
> -U_NO_LONGLONG 
> -D_KERNEL  -U_ASM_INLINES -D_SYSCALL32 -D_SYSCALL32_IMPL  -Dsun -D__sun 
> -D__SVR4 
>   -DC2_AUDIT  -Wall -Wno-unknown-pragmas -Wno-missing-braces 
> -Wno-sign-compare 
> -Wno-parentheses -Wno-uninitialized -Wno-implicit-function-declaration 
> -Wno-unused -Wno-trigraphs -Wno-char-subscripts -Wno-switch  -Wno-format 
> -Werror 
> -Di86pc   -DDEBUG -DDEBUG_LEVEL=0 -UGEM_DEBUG_LEVEL  -I 
> /home/mrym/opensolaris/usr/src/uts/common -UUSE_FRAMEID -UMAP_MEM 
> -DGEM_CONFIG_POLLING  -DCONFIG_OO -DGEM_CONFIG_VLAN -DGEM_CONFIG_ND 
> -DGEM_CONFIG_CKSUM_OFFLOAD -DGEM_CONFIG_GLDv3 -DSOLARIS10 -DVERSION='"2.6.0"' 
> alta_gem.c -o i386/alta_gem.o
> alta_gem.c:1506: error: `gem_rsrv' undeclared here (not in a function)
> alta_gem.c:1506: error: initializer element is not constant
> alta_gem.c:1506: error: (near initialization for `altarinit.qi_srvp')
> alta_gem.c:1507: error: `gem_open' undeclared here (not in a function)
> alta_gem.c:1507: error: initializer element is not constant
> alta_gem.c:1507: error: (near initialization for `altarinit.qi_qopen')
> alta_gem.c:1508: error: `gem_close' undeclared here (not in a function)
> alta_gem.c:1508: error: initializer element is not constant
> alta_gem.c:1508: error: (near initialization for `altarinit.qi_qclose')
> alta_gem.c:1515: error: `gem_wput' undeclared here (not in a function)
> alta_gem.c:1515: error: initializer element is not constant
> alta_gem.c:1515: error: (near initialization for `altawinit.qi_putp')
> alta_gem.c:1516: error: `gem_wsrv' undeclared here (not in a function)
> alta_gem.c:1516: error: initializer element is not constant
> alta_gem.c:1516: error: (near initialization for `altawinit.qi_srvp')
> alta_gem.c:1557: error: `gem_getinfo' undeclared here (not in a function)
> alta_gem.c:1557: error: initializer element is not constant
> alta_gem.c:1557: error: (near initialization for `alta_ops.devo_getinfo')
> alta_gem.c:1566: error: `gem_power' undeclared here (not in a function)
> alta_gem.c:1566: error: initializer element is not constant
> alta_gem.c:1566: error: (near initialization for `alta_ops.devo_power')
> *** Error code 1
> make: Fatal error: Command failed for target `i386/alta_gem.o'
>
>
>
> $ ls -alh
> total 771
> drwxr-xr-x   6 estibi   other         31 lis  5 15:27 .
> drwxr-xr-x   8 estibi   other         20 lis  5 15:20 ..
> -rwxr-xr-x   1 estibi   other        389 lut  3  2008 adddrv.sh
> -r--r--r--   1 estibi   other        38K lut  3  2008 alta_gem.c
> drwxr-xr-x   2 estibi   other          2 lis  5 14:06 amd64
> -r--r--r--   1 estibi   other       1,6K lut  3  2008 COPYING
> -r--r--r--   1 estibi   other       6,4K lut  3  2008 gem_mii.h
> -r--r--r--   1 estibi   other       181K lut  3  2008 gem.c
> -r--r--r--   1 estibi   other        20K lut  3  2008 gem.h
> drwxr-xr-x   2 estibi   other          2 lis  5 14:04 i386
> lrwxrwxrwx   1 estibi   other         17 lis  5 15:26 Makefile -> 
> Makefile.i386_gcc
> -r--r--r--   1 estibi   other        559 lut  3  2008 Makefile.amd64_gcc
> -r--r--r--   1 estibi   other        567 lut  3  2008 Makefile.amd64_suncc
> -r--r--r--   1 estibi   other       2,8K lut  3  2008 Makefile.common
> lrwxrwxrwx   1 estibi   other         20 lis  5 14:04 Makefile.config -> 
> Makefile.config_gld3
> -r--r--r--   1 estibi   other        616 lut  3  2008 Makefile.config_gld2
> -r--r--r--   1 estibi   other        435 lut  3  2008 Makefile.config_gld3
> -r--r--r--   1 estibi   other        360 lut  3  2008 Makefile.i386_gcc
> -r--r--r--   1 estibi   other        365 lut  3  2008 Makefile.i386_suncc
> -r--r--r--   1 estibi   other       1,2K lut  3  2008 Makefile.macros
> -r--r--r--   1 estibi   other        362 lut  3  2008 Makefile.sparc_gcc
> -r--r--r--   1 estibi   other        367 lut  3  2008 Makefile.sparc_suncc
> -r--r--r--   1 estibi   other        566 lut  3  2008 Makefile.sparcv9_gcc
> -r--r--r--   1 estibi   other        575 lut  3  2008 Makefile.sparcv9_suncc
> lrwxrwxrwx   1 estibi   other          4 lis  5 15:27 obj -> i386
> -r--r--r--   1 estibi   other       6,9K lut  3  2008 README.japanese-euc
> -r--r--r--   1 estibi   other       5,5K lut  3  2008 README.txt
> drwxr-xr-x   2 estibi   other          2 lut  3  2008 sparc
> drwxr-xr-x   2 estibi   other          2 lut  3  2008 sparcv9
> -r--r--r--   1 estibi   other        13K lut  3  2008 st201reg.h
> -r--r--r--   1 estibi   other         71 lut  3  2008 version
>
>
> $ rm Makefile
> $ ln -s Makefile.i386_suncc Makefile
>
>
> $ /usr/ccs/bin/make
> cc -c -xO3 -D"__INLINE__=" -U_NO_LONGLONG -D_KERNEL  -U_ASM_INLINES 
> -D_SYSCALL32 
> -D_SYSCALL32_IMPL  -Dsun -D__sun -D__SVR4  -DC2_AUDIT  -Xa -xspace -v 
> -xc99=%all 
> -errtags=yes -errwarn=%all -xstrconst -Di86pc   -DDEBUG -DDEBUG_LEVEL=0 
> -UGEM_DEBUG_LEVEL  -I /home/mrym/opensolaris/usr/src/uts/common -UUSE_FRAMEID 
> -UMAP_MEM -DGEM_CONFIG_POLLING  -DCONFIG_OO -DGEM_CONFIG_VLAN -DGEM_CONFIG_ND 
> -DGEM_CONFIG_CKSUM_OFFLOAD -DGEM_CONFIG_GLDv3 -DSOLARIS10 -DVERSION='"2.6.0"' 
> alta_gem.c -o i386/alta_gem.o
> "alta_gem.c", line 1506: undefined symbol: gem_rsrv
> "alta_gem.c", line 1506: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1506: non-constant initializer: op "NAME"
> "alta_gem.c", line 1507: undefined symbol: gem_open
> "alta_gem.c", line 1507: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1507: non-constant initializer: op "NAME"
> "alta_gem.c", line 1508: undefined symbol: gem_close
> "alta_gem.c", line 1508: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1508: non-constant initializer: op "NAME"
> "alta_gem.c", line 1515: undefined symbol: gem_wput
> "alta_gem.c", line 1515: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1515: non-constant initializer: op "NAME"
> "alta_gem.c", line 1516: undefined symbol: gem_wsrv
> "alta_gem.c", line 1516: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1516: non-constant initializer: op "NAME"
> "alta_gem.c", line 1557: undefined symbol: gem_getinfo
> "alta_gem.c", line 1557: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1557: non-constant initializer: op "NAME"
> "alta_gem.c", line 1566: undefined symbol: gem_power
> "alta_gem.c", line 1566: warning: improper pointer/integer combination: op 
> "=" 
> (E_BAD_PTR_INT_COMBINATION)
> "alta_gem.c", line 1566: non-constant initializer: op "NAME"
> cc: acomp failed for alta_gem.c
> *** Error code 2
> make: Fatal error: Command failed for target `i386/alta_gem.o'
>
>
>
> $ /opt/SUNWspro/bin/cc -V
> cc: Sun C 5.8 Patch 121016-05 2007/01/10
> usage: cc [ options] files.  Use 'cc -flags' for details
>
> $ /usr/sfw/bin/gcc -v
> Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
> Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure 
> --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as 
> --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc 
> --enable-shared
> Thread model: posix
> gcc version 3.4.3 (csl-sol210-3_4-20050802)
>
>
> $ uname -srv
> SunOS 5.11 snv_101
>
> Btw, it compiles against GLDv2, but not GLDv3.
>
> $ /usr/ccs/bin/make
> cc -c -xO3 -D"__INLINE__=" -U_NO_LONGLONG -D_KERNEL  -U_ASM_INLINES 
> -D_SYSCALL32 
> -D_SYSCALL32_IMPL  -Dsun -D__sun -D__SVR4  -DC2_AUDIT  -Xa -xspace -v 
> -xc99=%all 
> -errtags=yes -errwarn=%all -xstrconst -Di86pc   -DDEBUG -DDEBUG_LEVEL=0 
> -UGEM_DEBUG_LEVEL -DGEM_CONFIG_POLLING -UGEM_CONFIG_GLDv3 -UGEM_CONFIG_VLAN 
> -UGEM_CONFIG_CKSUM_OFFLOAD -UGEM_CONFIG_ND  -Unotdef -UNEVER 
> -UGEM_GCC_RUNTIME 
> -UGEM_CONFIG_VLAN_HW  -UGEM_COMPAT -USANITY -UGEM_CONFIG_FMA -UMODULE 
> -UGEM_CONFIG_RX_DIRECT -DGEM_CONFIG_TX_DIRECT  -UOS_PUTBACK -UUSE_FRAMEID 
> -UMAP_MEM -DVERSION='"2.6.0"' alta_gem.c -o i386/alta_gem.o
> cc -c -xO3 -D"__INLINE__=" -U_NO_LONGLONG -D_KERNEL  -U_ASM_INLINES 
> -D_SYSCALL32 
> -D_SYSCALL32_IMPL  -Dsun -D__sun -D__SVR4  -DC2_AUDIT  -Xa -xspace -v 
> -xc99=%all 
> -errtags=yes -errwarn=%all -xstrconst -Di86pc   -DDEBUG -DDEBUG_LEVEL=0 
> -UGEM_DEBUG_LEVEL -DGEM_CONFIG_POLLING -UGEM_CONFIG_GLDv3 -UGEM_CONFIG_VLAN 
> -UGEM_CONFIG_CKSUM_OFFLOAD -UGEM_CONFIG_ND  -Unotdef -UNEVER 
> -UGEM_GCC_RUNTIME 
> -UGEM_CONFIG_VLAN_HW  -UGEM_COMPAT -USANITY -UGEM_CONFIG_FMA -UMODULE 
> -UGEM_CONFIG_RX_DIRECT -DGEM_CONFIG_TX_DIRECT  -UOS_PUTBACK -UUSE_FRAMEID 
> -UMAP_MEM -DVERSION='"2.6.0"' gem.c -o i386/gem.o
> /usr/ccs/bin/ld -r -dy -N misc/gld i386/alta_gem.o i386/gem.o -o i386/alta
>
>
>
>
>   

_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to