NAME_IN and COPY built-in

NAME_IN函数用于间接获取变量或项的内容,而COPY过程则允许间接地将值分配给指定的变量或项。在PL/SQL触发器中,当在进入查询模式下执行时,必须使用NAME_IN来访问数据块中的值。间接引用使得编写更通用、可重用的代码成为可能,并且在库或菜单模块中的PL/SQL中引用表单绑定变量时是必需的。
You can reference items indirectly with the NAME_IN and COPY built-in subprograms.
The NAME_IN function returns the contents of an indicated variable or item.  Use the NAME_IN function to get the value of an item without referring to the item directly.
The following statements are equivalent:

IF :emp.ename = 'smith' -- direct reference
IF NAME_IN('emp.ename') = 'smith' -- indirect reference

The return value is always a character string.  To use NAME_IN for a DATE or NUMBER item, convert the string to the desired data type with the appropriate conversion function:

date_var := TO_DATE(Name_In('order.date_item'));
num_var := TO_NUMBER(Name_In('order.number_item'));

Notes on NAME_IN:

*The NAME_IN function cannot return the contents of a global or local variable.

*In PL/SQL triggers that will be executed in enter-query mode, you must use NAME_IN rather than normalbind-variable notation to access values in the data-block.  (This is because the end-user might  type relational operators into the item, producing a value which is not in a form that can be processed by PL/SQL.)

The COPY Procedure  The COPY procedure assigns an indicated value to an indicated variable or item.  Unlike standard PL/SQL assignment, however, using the COPY procedure allows you to indirectly reference the item whose value is being set:

:emp.ename := 'smith';     -- direct reference
Copy('smith','emp.ename');     -- indirect reference


COPY can be used with the NAME_IN function to assign a value to an item whose name is stored in a reference variable or item:

/* put value 'smith' in item whose name is stored in ref_item */
Copy('smith',Name_In('control.ref_item'));

Why Use Indirect Reference  Referencing items indirectly allows you to write more generic, reusable code.  By using variables in place of actual item names, you can write a subprogram that can operate on any item whose name has been assigned to the indicated variable.
Also, using indirect reference is mandatory when you refer to the value of a form bind variable (item, parameter, global variable) in PL/SQL that you write in a library or a menu module.Because libraries, menus, and forms are separate application modules, you cannot refer directly to the value of a form item in a menu-item command or library procedure.  

library is not saved within form. but in different file, so there is no where to find :frm1.txt1

for example, if you have a procedure in library:

procedure p1( v_one varchar2)

name_in(v_one)   to get the value inside v_one, that is :frm1.txt1, so:

copy('value', name_in(v_one))        ==> to copy value to the txt field txt1 in form frm1.

you can't use:

copy('value', :frm1.txt1), nor you can:

copy('value', v_one).


make[10]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include/curl' make[9]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include/curl' make[9]: Entering directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include' make[10]: Entering directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include' make[10]: Nothing to be done for 'install-exec-am'. make[10]: Nothing to be done for 'install-data-am'. make[10]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include' make[9]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include' make[8]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/include' make[7]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1' make[6]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1' make[5]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1' make[4]: Leaving directory '/mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1' touch /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/.built mkdir -p /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/CONTROL /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo install -d -m0755 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/usr/lib cp -fpR /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/lib/libcurl.so.* /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/usr/lib/ find /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf export CROSS="aarch64-openwrt-linux-musl-" NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="aarch64-openwrt-linux-musl-strip --strip-all" STRIP_KMOD="/mydisk/omada_gateway/scripts/strip-kmod.sh" /mydisk/omada_gateway/scripts/rstrip.sh /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl rstrip.sh: /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/usr/lib/libcurl.so.4.8.0:shared object ( echo "Package: libcurl"; echo "Version: 7.83.1"; DEPENDS=''; for depend in libc libopenssl ca-bundle librt; do DEPENDS=${DEPENDS:+$DEPENDS, }${depend##+}; done; [ -z "$DEPENDS" ] || echo "Depends: $DEPENDS"; echo "Source: package/network/utils/curl"; echo "License: MIT"; echo "LicenseFiles: COPYING"; echo "Section: libs"; echo "Maintainer: Stan Grishin <stangri@melmac.ca>"; echo "Architecture: aarch64_cortex-a53"; echo "Installed-Size: 0"; echo -n "Description: "; . /mydisk/omada_gateway/include/shell.sh; getvar V_Package_libcurl_description | sed -e 's,^[[:space:]]*, ,g'; ) > /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/CONTROL/control chmod 644 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/CONTROL/control . /mydisk/omada_gateway/include/shell.sh; (cd /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl/CONTROL; ) install -d -m0755 /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages ipkg-build -c -o 0 -g 0 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages Packaged contents of /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/libcurl into /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages/libcurl_7.83.1_aarch64_cortex-a53.ipk rm -rf /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl mkdir -p /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/stamp /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl install -d -m0755 /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl/usr/lib cp -fpR /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/lib/libcurl.so.* /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl/usr/lib/ SHELL= /mydisk/omada_gateway/staging_dir/host/bin/flock /mydisk/omada_gateway/tmp/.root-copy.flock -c 'cp -fpR /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl/. /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/' rm -rf /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-libcurl touch /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/stamp/.libcurl_installed echo '4' | cmp -s - /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/libcurl.version || echo '4' > /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/libcurl.version if [ -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install.clean ]; then rm -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install.clean; fi; echo "libcurl" >> /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install make V=ss -j1 clean-staging make[4]: Entering directory '/mydisk/omada_gateway/package/network/utils/curl' rm -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/stamp/.curl_installed make[4]: Leaving directory '/mydisk/omada_gateway/package/network/utils/curl' rm -rf /mydisk/omada_gateway/tmp/stage-curl mkdir -p /mydisk/omada_gateway/tmp/stage-curl/host /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/packages /mydisk/omada_gateway/staging_dir/host/packages install -d -m0755 /mydisk/omada_gateway/tmp/stage-curl/host/bin /mydisk/omada_gateway/tmp/stage-curl/usr/bin /mydisk/omada_gateway/tmp/stage-curl/usr/include /mydisk/omada_gateway/tmp/stage-curl/usr/lib /mydisk/omada_gateway/tmp/stage-curl/usr/lib/pkgconfig install -m0755 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/bin/curl-config /mydisk/omada_gateway/tmp/stage-curl/usr/bin/ cp -fpR /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/include/curl /mydisk/omada_gateway/tmp/stage-curl/usr/include/ cp -fpR /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/lib/libcurl.{a,so*} /mydisk/omada_gateway/tmp/stage-curl/usr/lib/ cp -fpR /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/libcurl.pc /mydisk/omada_gateway/tmp/stage-curl/usr/lib/pkgconfig/ /mydisk/omada_gateway/staging_dir/host/bin/sed -i -e 's,^\(prefix\|exec_prefix\)=.*,\1=/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/usr,g' /mydisk/omada_gateway/tmp/stage-curl/usr/bin/curl-config [ -n "-L/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/usr/lib -L/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/lib -L/mydisk/omada_gateway/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl-1.2.4/usr/lib -L/mydisk/omada_gateway/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl-1.2.4/lib -Wl,--gc-sections" ] && /mydisk/omada_gateway/staging_dir/host/bin/sed -i -e 's#-L/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/usr/lib -L/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/lib -L/mydisk/omada_gateway/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl-1.2.4/usr/lib -L/mydisk/omada_gateway/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl-1.2.4/lib -Wl,--gc-sections##g' /mydisk/omada_gateway/tmp/stage-curl/usr/lib/pkgconfig/libcurl.pc || true ln -sf /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/usr/bin/curl-config /mydisk/omada_gateway/tmp/stage-curl/host/bin/ find /mydisk/omada_gateway/tmp/stage-curl -name '*.la' | xargs -r rm -f; if [ -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/packages/curl.list ]; then /mydisk/omada_gateway/scripts/clean-package.sh "/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/packages/curl.list" "/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1"; fi if [ -d /mydisk/omada_gateway/tmp/stage-curl ]; then (cd /mydisk/omada_gateway/tmp/stage-curl; find ./ > /mydisk/omada_gateway/tmp/stage-curl.files); SHELL= /mydisk/omada_gateway/staging_dir/host/bin/flock /mydisk/omada_gateway/tmp/.staging-dir.flock -c ' mv /mydisk/omada_gateway/tmp/stage-curl.files /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/packages/curl.list && cp -fpR /mydisk/omada_gateway/tmp/stage-curl/* /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/; '; fi rm -rf /mydisk/omada_gateway/tmp/stage-curl touch /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/stamp/.curl_installed mkdir -p /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/CONTROL /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo install -d -m0755 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/usr/bin install -m0755 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/bin/curl /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/usr/bin/ find /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf export CROSS="aarch64-openwrt-linux-musl-" NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="aarch64-openwrt-linux-musl-strip --strip-all" STRIP_KMOD="/mydisk/omada_gateway/scripts/strip-kmod.sh" /mydisk/omada_gateway/scripts/rstrip.sh /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl rstrip.sh: /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/usr/bin/curl:executable ( echo "Package: curl"; echo "Version: 7.83.1"; DEPENDS=''; for depend in libc libcurl; do DEPENDS=${DEPENDS:+$DEPENDS, }${depend##+}; done; [ -z "$DEPENDS" ] || echo "Depends: $DEPENDS"; echo "Source: package/network/utils/curl"; echo "License: MIT"; echo "LicenseFiles: COPYING"; echo "Section: net"; echo "Maintainer: Stan Grishin <stangri@melmac.ca>"; echo "Architecture: aarch64_cortex-a53"; echo "Installed-Size: 0"; echo -n "Description: "; . /mydisk/omada_gateway/include/shell.sh; getvar V_Package_curl_description | sed -e 's,^[[:space:]]*, ,g'; ) > /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/CONTROL/control chmod 644 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/CONTROL/control . /mydisk/omada_gateway/include/shell.sh; (cd /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl/CONTROL; ) install -d -m0755 /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages ipkg-build -c -o 0 -g 0 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages Packaged contents of /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-aarch64_cortex-a53/curl into /mydisk/omada_gateway/bin/mediatek-er706wp-4g_un_v1/packages/curl_7.83.1_aarch64_cortex-a53.ipk rm -rf /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl mkdir -p /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/stamp /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl install -d -m0755 /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl/usr/bin install -m0755 /mydisk/omada_gateway/build_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/curl-7.83.1/ipkg-install/usr/bin/curl /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl/usr/bin/ SHELL= /mydisk/omada_gateway/staging_dir/host/bin/flock /mydisk/omada_gateway/tmp/.root-copy.flock -c 'cp -fpR /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl/. /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/' rm -rf /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/tmp-curl touch /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/root-mediatek/stamp/.curl_installed if [ -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install.clean ]; then rm -f /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install.clean; fi; echo "curl" >> /mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/pkginfo/curl.default.install make[3]: Leaving directory '/mydisk/omada_gateway/package/network/utils/curl' make[2]: Leaving directory '/mydisk/omada_gateway' package/Makefile:202: recipe for target '/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/stamp/.package_compile' failed make[1]: *** [/mydisk/omada_gateway/staging_dir/target-aarch64_cortex-a53_musl-1.2.4-er706wp-4g_un_v1/stamp/.package_compile] Error 2 make[1]: Leaving directory '/mydisk/omada_gateway' /mydisk/omada_gateway/include/toplevel.mk:171: recipe for target 'world' failed make: *** [world] Error 2
最新发布
11-18
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * SPDX-License-Identifier: curl * ***************************************************************************/ #include "curl_setup.h" #include "urldata.h" #include <curl/curl.h> #include <stddef.h> #ifdef HAVE_LIBZ #include <zlib.h> #endif #ifdef HAVE_BROTLI #include <brotli/decode.h> #endif #ifdef HAVE_ZSTD #include <zstd.h> #endif #include "sendf.h" #include "http.h" #include "content_encoding.h" #include "strdup.h" #include "strcase.h" #include "curl_memory.h" #include "memdebug.h" #define CONTENT_ENCODING_DEFAULT "identity" #ifndef CURL_DISABLE_HTTP #define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */ #ifdef HAVE_LIBZ /* Comment this out if zlib is always going to be at least ver. 1.2.0.4 (doing so will reduce code size slightly). */ #define OLD_ZLIB_SUPPORT 1 #define GZIP_MAGIC_0 0x1f #define GZIP_MAGIC_1 0x8b /* gzip flag byte */ #define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ #define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ #define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ #define ORIG_NAME 0x08 /* bit 3 set: original file name present */ #define COMMENT 0x10 /* bit 4 set: file comment present */ #define RESERVED 0xE0 /* bits 5..7: reserved */ typedef enum { ZLIB_UNINIT, /* uninitialized */ ZLIB_INIT, /* initialized */ ZLIB_INFLATING, /* inflating started. */ ZLIB_EXTERNAL_TRAILER, /* reading external trailer */ ZLIB_GZIP_HEADER, /* reading gzip header */ ZLIB_GZIP_INFLATING, /* inflating gzip stream */ ZLIB_INIT_GZIP /* initialized in transparent gzip mode */ } zlibInitState; /* Deflate and gzip writer. */ struct zlib_writer { struct contenc_writer super; zlibInitState zlib_init; /* zlib init state */ uInt trailerlen; /* Remaining trailer byte count. */ z_stream z; /* State structure for zlib. */ }; static voidpf zalloc_cb(voidpf opaque, unsigned int items, unsigned int size) { (void) opaque; /* not a typo, keep it calloc() */ return (voidpf) calloc(items, size); } static void zfree_cb(voidpf opaque, voidpf ptr) { (void) opaque; free(ptr); } static CURLcode process_zlib_error(struct Curl_easy *data, z_stream *z) { if(z->msg) failf(data, "Error while processing content unencoding: %s", z->msg); else failf(data, "Error while processing content unencoding: " "Unknown failure within decompression software."); return CURLE_BAD_CONTENT_ENCODING; } static CURLcode exit_zlib(struct Curl_easy *data, z_stream *z, zlibInitState *zlib_init, CURLcode result) { if(*zlib_init == ZLIB_GZIP_HEADER) Curl_safefree(z->next_in); if(*zlib_init != ZLIB_UNINIT) { if(inflateEnd(z) != Z_OK && result == CURLE_OK) result = process_zlib_error(data, z); *zlib_init = ZLIB_UNINIT; } return result; } static CURLcode process_trailer(struct Curl_easy *data, struct zlib_writer *zp) { z_stream *z = &zp->z; CURLcode result = CURLE_OK; uInt len = z->avail_in < zp->trailerlen? z->avail_in: zp->trailerlen; /* Consume expected trailer bytes. Terminate stream if exhausted. Issue an error if unexpected bytes follow. */ zp->trailerlen -= len; z->avail_in -= len; z->next_in += len; if(z->avail_in) result = CURLE_WRITE_ERROR; if(result || !zp->trailerlen) result = exit_zlib(data, z, &zp->zlib_init, result); else { /* Only occurs for gzip with zlib < 1.2.0.4 or raw deflate. */ zp->zlib_init = ZLIB_EXTERNAL_TRAILER; } return result; } static CURLcode inflate_stream(struct Curl_easy *data, struct contenc_writer *writer, zlibInitState started) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ uInt nread = z->avail_in; Bytef *orig_in = z->next_in; bool done = FALSE; CURLcode result = CURLE_OK; /* Curl_client_write status */ char *decomp; /* Put the decompressed data here. */ /* Check state. */ if(zp->zlib_init != ZLIB_INIT && zp->zlib_init != ZLIB_INFLATING && zp->zlib_init != ZLIB_INIT_GZIP && zp->zlib_init != ZLIB_GZIP_INFLATING) return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR); /* Dynamically allocate a buffer for decompression because it's uncommonly large to hold on the stack */ decomp = malloc(DSIZ); if(!decomp) return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); /* because the buffer size is fixed, iteratively decompress and transfer to the client via downstream_write function. */ while(!done) { int status; /* zlib status */ done = TRUE; /* (re)set buffer for decompressed output for every iteration */ z->next_out = (Bytef *) decomp; z->avail_out = DSIZ; #ifdef Z_BLOCK /* Z_BLOCK is only available in zlib ver. >= 1.2.0.5 */ status = inflate(z, Z_BLOCK); #else /* fallback for zlib ver. < 1.2.0.5 */ status = inflate(z, Z_SYNC_FLUSH); #endif /* Flush output data if some. */ if(z->avail_out != DSIZ) { if(status == Z_OK || status == Z_STREAM_END) { zp->zlib_init = started; /* Data started. */ result = Curl_unencode_write(data, writer->downstream, decomp, DSIZ - z->avail_out); if(result) { exit_zlib(data, z, &zp->zlib_init, result); break; } } } /* Dispatch by inflate() status. */ switch(status) { case Z_OK: /* Always loop: there may be unflushed latched data in zlib state. */ done = FALSE; break; case Z_BUF_ERROR: /* No more data to flush: just exit loop. */ break; case Z_STREAM_END: result = process_trailer(data, zp); break; case Z_DATA_ERROR: /* some servers seem to not generate zlib headers, so this is an attempt to fix and continue anyway */ if(zp->zlib_init == ZLIB_INIT) { /* Do not use inflateReset2(): only available since zlib 1.2.3.4. */ (void) inflateEnd(z); /* don't care about the return code */ if(inflateInit2(z, -MAX_WBITS) == Z_OK) { z->next_in = orig_in; z->avail_in = nread; zp->zlib_init = ZLIB_INFLATING; zp->trailerlen = 4; /* Tolerate up to 4 unknown trailer bytes. */ done = FALSE; break; } zp->zlib_init = ZLIB_UNINIT; /* inflateEnd() already called. */ } result = exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); break; default: result = exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); break; } } free(decomp); /* We're about to leave this call so the `nread' data bytes won't be seen again. If we are in a state that would wrongly allow restart in raw mode at the next call, assume output has already started. */ if(nread && zp->zlib_init == ZLIB_INIT) zp->zlib_init = started; /* Cannot restart anymore. */ return result; } /* Deflate handler. */ static CURLcode deflate_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ if(!writer->downstream) return CURLE_WRITE_ERROR; /* Initialize zlib */ z->zalloc = (alloc_func) zalloc_cb; z->zfree = (free_func) zfree_cb; if(inflateInit(z) != Z_OK) return process_zlib_error(data, z); zp->zlib_init = ZLIB_INIT; return CURLE_OK; } static CURLcode deflate_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ /* Set the compressed input when this function is called */ z->next_in = (Bytef *) buf; z->avail_in = (uInt) nbytes; if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER) return process_trailer(data, zp); /* Now uncompress the data */ return inflate_stream(data, writer, ZLIB_INFLATING); } static void deflate_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ exit_zlib(data, z, &zp->zlib_init, CURLE_OK); } static const struct content_encoding deflate_encoding = { "deflate", NULL, deflate_init_writer, deflate_unencode_write, deflate_close_writer, sizeof(struct zlib_writer) }; /* Gzip handler. */ static CURLcode gzip_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ if(!writer->downstream) return CURLE_WRITE_ERROR; /* Initialize zlib */ z->zalloc = (alloc_func) zalloc_cb; z->zfree = (free_func) zfree_cb; if(strcmp(zlibVersion(), "1.2.0.4") >= 0) { /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */ if(inflateInit2(z, MAX_WBITS + 32) != Z_OK) { return process_zlib_error(data, z); } zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ } else { /* we must parse the gzip header and trailer ourselves */ if(inflateInit2(z, -MAX_WBITS) != Z_OK) { return process_zlib_error(data, z); } zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */ zp->zlib_init = ZLIB_INIT; /* Initial call state */ } return CURLE_OK; } #ifdef OLD_ZLIB_SUPPORT /* Skip over the gzip header */ static enum { GZIP_OK, GZIP_BAD, GZIP_UNDERFLOW } check_gzip_header(unsigned char const *data, ssize_t len, ssize_t *headerlen) { int method, flags; const ssize_t totallen = len; /* The shortest header is 10 bytes */ if(len < 10) return GZIP_UNDERFLOW; if((data[0] != GZIP_MAGIC_0) || (data[1] != GZIP_MAGIC_1)) return GZIP_BAD; method = data[2]; flags = data[3]; if(method != Z_DEFLATED || (flags & RESERVED) != 0) { /* Can't handle this compression method or unknown flag */ return GZIP_BAD; } /* Skip over time, xflags, OS code and all previous bytes */ len -= 10; data += 10; if(flags & EXTRA_FIELD) { ssize_t extra_len; if(len < 2) return GZIP_UNDERFLOW; extra_len = (data[1] << 8) | data[0]; if(len < (extra_len + 2)) return GZIP_UNDERFLOW; len -= (extra_len + 2); data += (extra_len + 2); } if(flags & ORIG_NAME) { /* Skip over NUL-terminated file name */ while(len && *data) { --len; ++data; } if(!len || *data) return GZIP_UNDERFLOW; /* Skip over the NUL */ --len; ++data; } if(flags & COMMENT) { /* Skip over NUL-terminated comment */ while(len && *data) { --len; ++data; } if(!len || *data) return GZIP_UNDERFLOW; /* Skip over the NUL */ --len; } if(flags & HEAD_CRC) { if(len < 2) return GZIP_UNDERFLOW; len -= 2; } *headerlen = totallen - len; return GZIP_OK; } #endif static CURLcode gzip_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ if(zp->zlib_init == ZLIB_INIT_GZIP) { /* Let zlib handle the gzip decompression entirely */ z->next_in = (Bytef *) buf; z->avail_in = (uInt) nbytes; /* Now uncompress the data */ return inflate_stream(data, writer, ZLIB_INIT_GZIP); } #ifndef OLD_ZLIB_SUPPORT /* Support for old zlib versions is compiled away and we are running with an old version, so return an error. */ return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR); #else /* This next mess is to get around the potential case where there isn't * enough data passed in to skip over the gzip header. If that happens, we * malloc a block and copy what we have then wait for the next call. If * there still isn't enough (this is definitely a worst-case scenario), we * make the block bigger, copy the next part in and keep waiting. * * This is only required with zlib versions < 1.2.0.4 as newer versions * can handle the gzip header themselves. */ switch(zp->zlib_init) { /* Skip over gzip header? */ case ZLIB_INIT: { /* Initial call state */ ssize_t hlen; switch(check_gzip_header((unsigned char *) buf, nbytes, &hlen)) { case GZIP_OK: z->next_in = (Bytef *) buf + hlen; z->avail_in = (uInt) (nbytes - hlen); zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ break; case GZIP_UNDERFLOW: /* We need more data so we can find the end of the gzip header. It's * possible that the memory block we malloc here will never be freed if * the transfer abruptly aborts after this point. Since it's unlikely * that circumstances will be right for this code path to be followed in * the first place, and it's even more unlikely for a transfer to fail * immediately afterwards, it should seldom be a problem. */ z->avail_in = (uInt) nbytes; z->next_in = malloc(z->avail_in); if(!z->next_in) { return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); } memcpy(z->next_in, buf, z->avail_in); zp->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ /* We don't have any data to inflate yet */ return CURLE_OK; case GZIP_BAD: default: return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); } } break; case ZLIB_GZIP_HEADER: { /* Need more gzip header data state */ ssize_t hlen; z->avail_in += (uInt) nbytes; z->next_in = Curl_saferealloc(z->next_in, z->avail_in); if(!z->next_in) { return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); } /* Append the new block of data to the previous one */ memcpy(z->next_in + z->avail_in - nbytes, buf, nbytes); switch(check_gzip_header(z->next_in, z->avail_in, &hlen)) { case GZIP_OK: /* This is the zlib stream data */ free(z->next_in); /* Don't point into the malloced block since we just freed it */ z->next_in = (Bytef *) buf + hlen + nbytes - z->avail_in; z->avail_in = (uInt) (z->avail_in - hlen); zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ break; case GZIP_UNDERFLOW: /* We still don't have any data to inflate! */ return CURLE_OK; case GZIP_BAD: default: return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); } } break; case ZLIB_EXTERNAL_TRAILER: z->next_in = (Bytef *) buf; z->avail_in = (uInt) nbytes; return process_trailer(data, zp); case ZLIB_GZIP_INFLATING: default: /* Inflating stream state */ z->next_in = (Bytef *) buf; z->avail_in = (uInt) nbytes; break; } if(z->avail_in == 0) { /* We don't have any data to inflate; wait until next time */ return CURLE_OK; } /* We've parsed the header, now uncompress the data */ return inflate_stream(data, writer, ZLIB_GZIP_INFLATING); #endif } static void gzip_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ exit_zlib(data, z, &zp->zlib_init, CURLE_OK); } static const struct content_encoding gzip_encoding = { "gzip", "x-gzip", gzip_init_writer, gzip_unencode_write, gzip_close_writer, sizeof(struct zlib_writer) }; #endif /* HAVE_LIBZ */ #ifdef HAVE_BROTLI /* Brotli writer. */ struct brotli_writer { struct contenc_writer super; BrotliDecoderState *br; /* State structure for brotli. */ }; static CURLcode brotli_map_error(BrotliDecoderErrorCode be) { switch(be) { case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: case BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: case BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: case BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: case BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: case BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: case BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: case BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: case BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: case BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: case BROTLI_DECODER_ERROR_FORMAT_PADDING_1: case BROTLI_DECODER_ERROR_FORMAT_PADDING_2: #ifdef BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY case BROTLI_DECODER_ERROR_COMPOUND_DICTIONARY: #endif #ifdef BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET case BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: #endif case BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: return CURLE_BAD_CONTENT_ENCODING; case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: case BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: case BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: case BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: case BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: return CURLE_OUT_OF_MEMORY; default: break; } return CURLE_WRITE_ERROR; } static CURLcode brotli_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct brotli_writer *bp = (struct brotli_writer *) writer; (void) data; if(!writer->downstream) return CURLE_WRITE_ERROR; bp->br = BrotliDecoderCreateInstance(NULL, NULL, NULL); return bp->br? CURLE_OK: CURLE_OUT_OF_MEMORY; } static CURLcode brotli_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { struct brotli_writer *bp = (struct brotli_writer *) writer; const uint8_t *src = (const uint8_t *) buf; char *decomp; uint8_t *dst; size_t dstleft; CURLcode result = CURLE_OK; BrotliDecoderResult r = BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT; if(!bp->br) return CURLE_WRITE_ERROR; /* Stream already ended. */ decomp = malloc(DSIZ); if(!decomp) return CURLE_OUT_OF_MEMORY; while((nbytes || r == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) && result == CURLE_OK) { dst = (uint8_t *) decomp; dstleft = DSIZ; r = BrotliDecoderDecompressStream(bp->br, &nbytes, &src, &dstleft, &dst, NULL); result = Curl_unencode_write(data, writer->downstream, decomp, DSIZ - dstleft); if(result) break; switch(r) { case BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: break; case BROTLI_DECODER_RESULT_SUCCESS: BrotliDecoderDestroyInstance(bp->br); bp->br = NULL; if(nbytes) result = CURLE_WRITE_ERROR; break; default: result = brotli_map_error(BrotliDecoderGetErrorCode(bp->br)); break; } } free(decomp); return result; } static void brotli_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct brotli_writer *bp = (struct brotli_writer *) writer; (void) data; if(bp->br) { BrotliDecoderDestroyInstance(bp->br); bp->br = NULL; } } static const struct content_encoding brotli_encoding = { "br", NULL, brotli_init_writer, brotli_unencode_write, brotli_close_writer, sizeof(struct brotli_writer) }; #endif #ifdef HAVE_ZSTD /* Zstd writer. */ struct zstd_writer { struct contenc_writer super; ZSTD_DStream *zds; /* State structure for zstd. */ void *decomp; }; static CURLcode zstd_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zstd_writer *zp = (struct zstd_writer *) writer; (void)data; if(!writer->downstream) return CURLE_WRITE_ERROR; zp->zds = ZSTD_createDStream(); zp->decomp = NULL; return zp->zds ? CURLE_OK : CURLE_OUT_OF_MEMORY; } static CURLcode zstd_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { CURLcode result = CURLE_OK; struct zstd_writer *zp = (struct zstd_writer *) writer; ZSTD_inBuffer in; ZSTD_outBuffer out; size_t errorCode; if(!zp->decomp) { zp->decomp = malloc(DSIZ); if(!zp->decomp) return CURLE_OUT_OF_MEMORY; } in.pos = 0; in.src = buf; in.size = nbytes; for(;;) { out.pos = 0; out.dst = zp->decomp; out.size = DSIZ; errorCode = ZSTD_decompressStream(zp->zds, &out, &in); if(ZSTD_isError(errorCode)) { return CURLE_BAD_CONTENT_ENCODING; } if(out.pos > 0) { result = Curl_unencode_write(data, writer->downstream, zp->decomp, out.pos); if(result) break; } if((in.pos == nbytes) && (out.pos < out.size)) break; } return result; } static void zstd_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { struct zstd_writer *zp = (struct zstd_writer *) writer; (void)data; if(zp->decomp) { free(zp->decomp); zp->decomp = NULL; } if(zp->zds) { ZSTD_freeDStream(zp->zds); zp->zds = NULL; } } static const struct content_encoding zstd_encoding = { "zstd", NULL, zstd_init_writer, zstd_unencode_write, zstd_close_writer, sizeof(struct zstd_writer) }; #endif /* Identity handler. */ static CURLcode identity_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR; } static CURLcode identity_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { return Curl_unencode_write(data, writer->downstream, buf, nbytes); } static void identity_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; (void) writer; } static const struct content_encoding identity_encoding = { "identity", "none", identity_init_writer, identity_unencode_write, identity_close_writer, sizeof(struct contenc_writer) }; /* supported content encodings table. */ static const struct content_encoding * const encodings[] = { &identity_encoding, #ifdef HAVE_LIBZ &deflate_encoding, &gzip_encoding, #endif #ifdef HAVE_BROTLI &brotli_encoding, #endif #ifdef HAVE_ZSTD &zstd_encoding, #endif NULL }; /* Return a list of comma-separated names of supported encodings. */ char *Curl_all_content_encodings(void) { size_t len = 0; const struct content_encoding * const *cep; const struct content_encoding *ce; char *ace; for(cep = encodings; *cep; cep++) { ce = *cep; if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) len += strlen(ce->name) + 2; } if(!len) return strdup(CONTENT_ENCODING_DEFAULT); ace = malloc(len); if(ace) { char *p = ace; for(cep = encodings; *cep; cep++) { ce = *cep; if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { strcpy(p, ce->name); p += strlen(p); *p++ = ','; *p++ = ' '; } } p[-2] = '\0'; } return ace; } /* Real client writer: no downstream. */ static CURLcode client_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; return writer->downstream? CURLE_WRITE_ERROR: CURLE_OK; } static CURLcode client_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { struct SingleRequest *k = &data->req; (void) writer; if(!nbytes || k->ignorebody) return CURLE_OK; return Curl_client_write(data, CLIENTWRITE_BODY, (char *) buf, nbytes); } static void client_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; (void) writer; } static const struct content_encoding client_encoding = { NULL, NULL, client_init_writer, client_unencode_write, client_close_writer, sizeof(struct contenc_writer) }; /* Deferred error dummy writer. */ static CURLcode error_init_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; return writer->downstream? CURLE_OK: CURLE_WRITE_ERROR; } static CURLcode error_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { char *all = Curl_all_content_encodings(); (void) writer; (void) buf; (void) nbytes; if(!all) return CURLE_OUT_OF_MEMORY; failf(data, "Unrecognized content encoding type. " "libcurl understands %s content encodings.", all); free(all); return CURLE_BAD_CONTENT_ENCODING; } static void error_close_writer(struct Curl_easy *data, struct contenc_writer *writer) { (void) data; (void) writer; } static const struct content_encoding error_encoding = { NULL, NULL, error_init_writer, error_unencode_write, error_close_writer, sizeof(struct contenc_writer) }; /* Create an unencoding writer stage using the given handler. */ static struct contenc_writer * new_unencoding_writer(struct Curl_easy *data, const struct content_encoding *handler, struct contenc_writer *downstream, int order) { struct contenc_writer *writer; DEBUGASSERT(handler->writersize >= sizeof(struct contenc_writer)); writer = (struct contenc_writer *) calloc(1, handler->writersize); if(writer) { writer->handler = handler; writer->downstream = downstream; writer->order = order; if(handler->init_writer(data, writer)) { free(writer); writer = NULL; } } return writer; } /* Write data using an unencoding writer stack. "nbytes" is not allowed to be 0. */ CURLcode Curl_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { if(!nbytes) return CURLE_OK; return writer->handler->unencode_write(data, writer, buf, nbytes); } /* Close and clean-up the connection's writer stack. */ void Curl_unencode_cleanup(struct Curl_easy *data) { struct SingleRequest *k = &data->req; struct contenc_writer *writer = k->writer_stack; while(writer) { k->writer_stack = writer->downstream; writer->handler->close_writer(data, writer); free(writer); writer = k->writer_stack; } } /* Find the content encoding by name. */ static const struct content_encoding *find_encoding(const char *name, size_t len) { const struct content_encoding * const *cep; for(cep = encodings; *cep; cep++) { const struct content_encoding *ce = *cep; if((strncasecompare(name, ce->name, len) && !ce->name[len]) || (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) return ce; } return NULL; } /* allow no more than 5 "chained" compression steps */ #define MAX_ENCODE_STACK 5 /* Set-up the unencoding stack from the Content-Encoding header value. * See RFC 7231 section 3.1.2.2. */ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data, const char *enclist, int is_transfer) { struct SingleRequest *k = &data->req; unsigned int order = is_transfer? 2: 1; do { const char *name; size_t namelen; /* Parse a single encoding name. */ while(ISBLANK(*enclist) || *enclist == ',') enclist++; name = enclist; for(namelen = 0; *enclist && *enclist != ','; enclist++) if(!ISSPACE(*enclist)) namelen = enclist - name + 1; /* Special case: chunked encoding is handled at the reader level. */ if(is_transfer && namelen == 7 && strncasecompare(name, "chunked", 7)) { k->chunk = TRUE; /* chunks coming our way. */ Curl_httpchunk_init(data); /* init our chunky engine. */ } else if(namelen) { const struct content_encoding *encoding = find_encoding(name, namelen); struct contenc_writer *writer; if(!k->writer_stack) { k->writer_stack = new_unencoding_writer(data, &client_encoding, NULL, 0); if(!k->writer_stack) return CURLE_OUT_OF_MEMORY; } if(!encoding) encoding = &error_encoding; /* Defer error at stack use. */ if(k->writer_stack_depth++ >= MAX_ENCODE_STACK) { failf(data, "Reject response due to more than %u content encodings", MAX_ENCODE_STACK); return CURLE_BAD_CONTENT_ENCODING; } /* Stack the unencoding stage. */ if(order >= k->writer_stack->order) { writer = new_unencoding_writer(data, encoding, k->writer_stack, order); if(!writer) return CURLE_OUT_OF_MEMORY; k->writer_stack = writer; } else { struct contenc_writer *w = k->writer_stack; while(w->downstream && order < w->downstream->order) w = w->downstream; writer = new_unencoding_writer(data, encoding, w->downstream, order); if(!writer) return CURLE_OUT_OF_MEMORY; w->downstream = writer; } } } while(*enclist); return CURLE_OK; } #else /* Stubs for builds without HTTP. */ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data, const char *enclist, int is_transfer) { (void) data; (void) enclist; (void) is_transfer; return CURLE_NOT_BUILT_IN; } CURLcode Curl_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { (void) data; (void) writer; (void) buf; (void) nbytes; return CURLE_NOT_BUILT_IN; } void Curl_unencode_cleanup(struct Curl_easy *data) { (void) data; } char *Curl_all_content_encodings(void) { return strdup(CONTENT_ENCODING_DEFAULT); /* Satisfy caller. */ } #endif /* CURL_DISABLE_HTTP */ 上边的是patch 下边的是源码: From 76f83f0db23846e254d940ec7fe141010077eb88 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg <daniel@haxx.se> Date: Fri, 24 Jan 2025 11:13:24 +0100 Subject: [PATCH] content_encoding: drop support for zlib before 1.2.0.4 zlib 1.2.0.4 was released on 10 August 2003 Closes #16079 --- docs/INTERNALS.md | 2 +- lib/content_encoding.c | 276 ++++------------------------------------- 2 files changed, 25 insertions(+), 253 deletions(-) diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md index ae77f0e54b05..4e42f4fd1015 100644 --- a/docs/INTERNALS.md +++ b/docs/INTERNALS.md @@ -23,7 +23,7 @@ versions of libs and build tools. - OpenSSL 0.9.7 - GnuTLS 3.1.10 - - zlib 1.1.4 + - zlib 1.2.0.4 - libssh2 1.0 - c-ares 1.16.0 - libidn2 2.0.0 diff --git a/lib/content_encoding.c b/lib/content_encoding.c index e19595d5ec42..d2b17297890d 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -55,33 +55,13 @@ #define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */ - #ifdef HAVE_LIBZ -/* Comment this out if zlib is always going to be at least ver. 1.2.0.4 - (doing so will reduce code size slightly). */ -#define OLD_ZLIB_SUPPORT 1 - -#define GZIP_MAGIC_0 0x1f -#define GZIP_MAGIC_1 0x8b - -/* gzip flag byte */ -#define CURL_GZIPFLAG_ASCII 0x01 /* bit 0 set: file probably ASCII - text */ -#define CURL_GZIPFLAG_HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define CURL_GZIPFLAG_EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define CURL_GZIPFLAG_ORIG_NAME 0x08 /* bit 3 set: original filename - present */ -#define CURL_GZIPFLAG_COMMENT 0x10 /* bit 4 set: file comment present */ -#define CURL_GZIPFLAG_RESERVED 0xE0 /* bits 5..7: reserved */ - typedef enum { ZLIB_UNINIT, /* uninitialized */ ZLIB_INIT, /* initialized */ ZLIB_INFLATING, /* inflating started. */ ZLIB_EXTERNAL_TRAILER, /* reading external trailer */ - ZLIB_GZIP_HEADER, /* reading gzip header */ - ZLIB_GZIP_INFLATING, /* inflating gzip stream */ ZLIB_INIT_GZIP /* initialized in transparent gzip mode */ } zlibInitState; @@ -139,9 +119,6 @@ static CURLcode exit_zlib(struct Curl_easy *data, z_stream *z, zlibInitState *zlib_init, CURLcode result) { - if(*zlib_init == ZLIB_GZIP_HEADER) - Curl_safefree(z->next_in); - if(*zlib_init != ZLIB_UNINIT) { if(inflateEnd(z) != Z_OK && result == CURLE_OK) result = process_zlib_error(data, z); @@ -190,8 +167,7 @@ static CURLcode inflate_stream(struct Curl_easy *data, /* Check state. */ if(zp->zlib_init != ZLIB_INIT && zp->zlib_init != ZLIB_INFLATING && - zp->zlib_init != ZLIB_INIT_GZIP && - zp->zlib_init != ZLIB_GZIP_INFLATING) + zp->zlib_init != ZLIB_INIT_GZIP) return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR); /* Dynamically allocate a buffer for decompression because it is uncommonly @@ -280,7 +256,7 @@ static CURLcode inflate_stream(struct Curl_easy *data, /* Deflate handler. */ static CURLcode deflate_do_init(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ @@ -296,8 +272,8 @@ static CURLcode deflate_do_init(struct Curl_easy *data, } static CURLcode deflate_do_write(struct Curl_easy *data, - struct Curl_cwriter *writer, int type, - const char *buf, size_t nbytes) + struct Curl_cwriter *writer, int type, + const char *buf, size_t nbytes) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ @@ -317,7 +293,7 @@ static CURLcode deflate_do_write(struct Curl_easy *data, } static void deflate_do_close(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ @@ -337,124 +313,34 @@ static const struct Curl_cwtype deflate_encoding = { /* Gzip handler. */ static CURLcode gzip_do_init(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ + const char *v = zlibVersion(); /* Initialize zlib */ z->zalloc = (alloc_func) zalloc_cb; z->zfree = (free_func) zfree_cb; - if(strcmp(zlibVersion(), "1.2.0.4") >= 0) { - /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */ + if(strcmp(v, "1.2.0.4") >= 0) { + /* zlib version >= 1.2.0.4 supports transparent gzip decompressing */ if(inflateInit2(z, MAX_WBITS + 32) != Z_OK) { return process_zlib_error(data, z); } zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ } else { - /* we must parse the gzip header and trailer ourselves */ - if(inflateInit2(z, -MAX_WBITS) != Z_OK) { - return process_zlib_error(data, z); - } - zp->trailerlen = 8; /* A CRC-32 and a 32-bit input size (RFC 1952, 2.2) */ - zp->zlib_init = ZLIB_INIT; /* Initial call state */ + failf(data, "too old zlib version: %s", v); + return CURLE_FAILED_INIT; } return CURLE_OK; } -#ifdef OLD_ZLIB_SUPPORT -/* Skip over the gzip header */ -typedef enum { - GZIP_OK, - GZIP_BAD, - GZIP_UNDERFLOW -} gzip_status; - -static gzip_status check_gzip_header(unsigned char const *data, ssize_t len, - ssize_t *headerlen) -{ - int method, flags; - const ssize_t totallen = len; - - /* The shortest header is 10 bytes */ - if(len < 10) - return GZIP_UNDERFLOW; - - if((data[0] != GZIP_MAGIC_0) || (data[1] != GZIP_MAGIC_1)) - return GZIP_BAD; - - method = data[2]; - flags = data[3]; - - if(method != Z_DEFLATED || (flags & CURL_GZIPFLAG_RESERVED) != 0) { - /* cannot handle this compression method or unknown flag */ - return GZIP_BAD; - } - - /* Skip over time, xflags, OS code and all previous bytes */ - len -= 10; - data += 10; - - if(flags & CURL_GZIPFLAG_EXTRA_FIELD) { - ssize_t extra_len; - - if(len < 2) - return GZIP_UNDERFLOW; - - extra_len = (data[1] << 8) | data[0]; - - if(len < (extra_len + 2)) - return GZIP_UNDERFLOW; - - len -= (extra_len + 2); - data += (extra_len + 2); - } - - if(flags & CURL_GZIPFLAG_ORIG_NAME) { - /* Skip over NUL-terminated filename */ - while(len && *data) { - --len; - ++data; - } - if(!len || *data) - return GZIP_UNDERFLOW; - - /* Skip over the NUL */ - --len; - ++data; - } - - if(flags & CURL_GZIPFLAG_COMMENT) { - /* Skip over NUL-terminated comment */ - while(len && *data) { - --len; - ++data; - } - if(!len || *data) - return GZIP_UNDERFLOW; - - /* Skip over the NUL */ - --len; - } - - if(flags & CURL_GZIPFLAG_HEAD_CRC) { - if(len < 2) - return GZIP_UNDERFLOW; - - len -= 2; - } - - *headerlen = totallen - len; - return GZIP_OK; -} -#endif - static CURLcode gzip_do_write(struct Curl_easy *data, - struct Curl_cwriter *writer, int type, - const char *buf, size_t nbytes) + struct Curl_cwriter *writer, int type, + const char *buf, size_t nbytes) { struct zlib_writer *zp = (struct zlib_writer *) writer; z_stream *z = &zp->z; /* zlib state structure */ @@ -470,117 +356,8 @@ static CURLcode gzip_do_write(struct Curl_easy *data, return inflate_stream(data, writer, type, ZLIB_INIT_GZIP); } -#ifndef OLD_ZLIB_SUPPORT - /* Support for old zlib versions is compiled away and we are running with - an old version, so return an error. */ + /* We are running with an old version: return error. */ return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR); - -#else - /* This next mess is to get around the potential case where there is not - * enough data passed in to skip over the gzip header. If that happens, we - * malloc a block and copy what we have then wait for the next call. If - * there still is not enough (this is definitely a worst-case scenario), we - * make the block bigger, copy the next part in and keep waiting. - * - * This is only required with zlib versions < 1.2.0.4 as newer versions - * can handle the gzip header themselves. - */ - - switch(zp->zlib_init) { - /* Skip over gzip header? */ - case ZLIB_INIT: - { - /* Initial call state */ - ssize_t hlen; - - switch(check_gzip_header((unsigned char *) buf, nbytes, &hlen)) { - case GZIP_OK: - z->next_in = (Bytef *) buf + hlen; - z->avail_in = (uInt) (nbytes - hlen); - zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ - break; - - case GZIP_UNDERFLOW: - /* We need more data so we can find the end of the gzip header. it is - * possible that the memory block we malloc here will never be freed if - * the transfer abruptly aborts after this point. Since it is unlikely - * that circumstances will be right for this code path to be followed in - * the first place, and it is even more unlikely for a transfer to fail - * immediately afterwards, it should seldom be a problem. - */ - z->avail_in = (uInt) nbytes; - z->next_in = malloc(z->avail_in); - if(!z->next_in) { - return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); - } - memcpy(z->next_in, buf, z->avail_in); - zp->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ - /* We do not have any data to inflate yet */ - return CURLE_OK; - - case GZIP_BAD: - default: - return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); - } - - } - break; - - case ZLIB_GZIP_HEADER: - { - /* Need more gzip header data state */ - ssize_t hlen; - z->avail_in += (uInt) nbytes; - z->next_in = Curl_saferealloc(z->next_in, z->avail_in); - if(!z->next_in) { - return exit_zlib(data, z, &zp->zlib_init, CURLE_OUT_OF_MEMORY); - } - /* Append the new block of data to the previous one */ - memcpy(z->next_in + z->avail_in - nbytes, buf, nbytes); - - switch(check_gzip_header(z->next_in, (ssize_t)z->avail_in, &hlen)) { - case GZIP_OK: - /* This is the zlib stream data */ - free(z->next_in); - /* Do not point into the malloced block since we just freed it */ - z->next_in = (Bytef *) buf + hlen + nbytes - z->avail_in; - z->avail_in = z->avail_in - (uInt)hlen; - zp->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ - break; - - case GZIP_UNDERFLOW: - /* We still do not have any data to inflate! */ - return CURLE_OK; - - case GZIP_BAD: - default: - return exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z)); - } - - } - break; - - case ZLIB_EXTERNAL_TRAILER: - z->next_in = (Bytef *) buf; - z->avail_in = (uInt) nbytes; - return process_trailer(data, zp); - - case ZLIB_GZIP_INFLATING: - default: - /* Inflating stream state */ - z->next_in = (Bytef *) buf; - z->avail_in = (uInt) nbytes; - break; - } - - if(z->avail_in == 0) { - /* We do not have any data to inflate; wait until next time */ - return CURLE_OK; - } - - /* We have parsed the header, now uncompress the data */ - return inflate_stream(data, writer, type, ZLIB_GZIP_INFLATING); -#endif } static void gzip_do_close(struct Curl_easy *data, @@ -603,7 +380,6 @@ static const struct Curl_cwtype gzip_encoding = { #endif /* HAVE_LIBZ */ - #ifdef HAVE_BROTLI /* Brotli writer. */ struct brotli_writer { @@ -650,7 +426,7 @@ static CURLcode brotli_map_error(BrotliDecoderErrorCode be) } static CURLcode brotli_do_init(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { struct brotli_writer *bp = (struct brotli_writer *) writer; (void) data; @@ -660,8 +436,8 @@ static CURLcode brotli_do_init(struct Curl_easy *data, } static CURLcode brotli_do_write(struct Curl_easy *data, - struct Curl_cwriter *writer, int type, - const char *buf, size_t nbytes) + struct Curl_cwriter *writer, int type, + const char *buf, size_t nbytes) { struct brotli_writer *bp = (struct brotli_writer *) writer; const uint8_t *src = (const uint8_t *) buf; @@ -733,7 +509,6 @@ static const struct Curl_cwtype brotli_encoding = { }; #endif - #ifdef HAVE_ZSTD /* Zstd writer. */ struct zstd_writer { @@ -757,7 +532,7 @@ static void Curl_zstd_free(void *opaque, void *address) #endif static CURLcode zstd_do_init(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { struct zstd_writer *zp = (struct zstd_writer *) writer; @@ -778,8 +553,8 @@ static CURLcode zstd_do_init(struct Curl_easy *data, } static CURLcode zstd_do_write(struct Curl_easy *data, - struct Curl_cwriter *writer, int type, - const char *buf, size_t nbytes) + struct Curl_cwriter *writer, int type, + const char *buf, size_t nbytes) { CURLcode result = CURLE_OK; struct zstd_writer *zp = (struct zstd_writer *) writer; @@ -810,7 +585,7 @@ static CURLcode zstd_do_write(struct Curl_easy *data, } if(out.pos > 0) { result = Curl_cwriter_write(data, writer->next, type, - zp->decomp, out.pos); + zp->decomp, out.pos); if(result) break; } @@ -848,7 +623,6 @@ static const struct Curl_cwtype zstd_encoding = { }; #endif - /* Identity handler. */ static const struct Curl_cwtype identity_encoding = { "identity", @@ -859,7 +633,6 @@ static const struct Curl_cwtype identity_encoding = { sizeof(struct Curl_cwriter) }; - /* supported general content decoders. */ static const struct Curl_cwtype * const general_unencoders[] = { &identity_encoding, @@ -923,7 +696,7 @@ void Curl_all_content_encodings(char *buf, size_t blen) /* Deferred error dummy writer. */ static CURLcode error_do_init(struct Curl_easy *data, - struct Curl_cwriter *writer) + struct Curl_cwriter *writer) { (void)data; (void)writer; @@ -931,8 +704,8 @@ static CURLcode error_do_init(struct Curl_easy *data, } static CURLcode error_do_write(struct Curl_easy *data, - struct Curl_cwriter *writer, int type, - const char *buf, size_t nbytes) + struct Curl_cwriter *writer, int type, + const char *buf, size_t nbytes) { (void) writer; (void) buf; @@ -1107,5 +880,4 @@ void Curl_all_content_encodings(char *buf, size_t blen) strcpy(buf, CONTENT_ENCODING_DEFAULT); } - #endif /* CURL_DISABLE_HTTP */ 现在就是想做的就是根据源码相应的函数的行数来修改patch中要修复的行数,不修改源码
09-12
RuntimeError: Failed to infer device type, please set the environment variable `VLLM_LOGGING_LEVEL=DEBUG` to turn on verbose logging to help debug the issue. 2025-07-25 13:35:45 INFO 07-24 22:35:45 [__init__.py:248] No platform detected, vLLM is running on UnspecifiedPlatform 2025-07-25 13:35:45 WARNING 07-24 22:35:45 [_custom_ops.py:20] Failed to import from vllm._C with ImportError('\x01: cannot open shared object file: No such file or directory') 2025-07-25 13:37:16 INFO 07-24 22:37:16 [__init__.py:248] No platform detected, vLLM is running on UnspecifiedPlatform 2025-07-25 13:37:16 WARNING 07-24 22:37:16 [_custom_ops.py:20] Failed to import from vllm._C with ImportError('\x01: cannot open shared object file: No such file or directory') 2025-07-25 13:37:19 Traceback (most recent call last): 2025-07-25 13:37:19 File "<frozen runpy>", line 198, in _run_module_as_main 2025-07-25 13:37:19 File "<frozen runpy>", line 88, in _run_code 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 1491, in <module> 2025-07-25 13:37:19 parser = make_arg_parser(parser) 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/cli_args.py", line 266, in make_arg_parser 2025-07-25 13:37:19 parser = AsyncEngineArgs.add_cli_args(parser) 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py", line 1717, in add_cli_args 2025-07-25 13:37:19 parser = EngineArgs.add_cli_args(parser) 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py", line 906, in add_cli_args 2025-07-25 13:37:19 vllm_kwargs = get_kwargs(VllmConfig) 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py", line 285, in get_kwargs 2025-07-25 13:37:19 return copy.deepcopy(_compute_kwargs(cls)) 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py", line 189, in _compute_kwargs 2025-07-25 13:37:19 default = field.default_factory() 2025-07-25 13:37:19 ^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/pydantic/_internal/_dataclasses.py", line 123, in __init__ 2025-07-25 13:37:19 s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s) 2025-07-25 13:37:19 File "/usr/local/lib/python3.12/dist-packages/vllm/config.py", line 2413, in __post_init__ 2025-07-25 13:37:19 raise RuntimeError( 2025-07-25 13:37:19 RuntimeError: Failed to infer device type, please set the environment variable `VLLM_LOGGING_LEVEL=DEBUG` to turn on verbose logging to help debug the issue.
07-26
huaxi@ubuntu:~/openwrt/openwrt-15.05.1$ make package/shared_memory/{clean,compile,install} V=s make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' rm -f /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/shared_memory_* rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/packages/.list /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/packages/.list rm -rf /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' make[1]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.prepared_5524e63513062cb9f66d349628e0b6b5 rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.toolchain_installed (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/./; if [ -x ./configure ]; then find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ -name config.guess | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ -name config.guess | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.guess; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ -name config.sub | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ -name config.sub | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.sub; AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CPPFLAGS="-I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; ) rm -f /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.configured_* touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.configured_yyy cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libgcc_s.so.1 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libuClibc-*.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libcrypt-*.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libm-*.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread-*.so /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/.built mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc/CONTROL /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libgcc_s.so.* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc/lib/ find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf export CROSS="arm-openwrt-linux-uclibcgnueabi-" NO_RENAME=1 ; NM="arm-openwrt-linux-uclibcgnueabi-nm" STRIP="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/sstrip" STRIP_KMOD="/home/huaxi/openwrt/openwrt-15.05.1/scripts/strip-kmod.sh" PATCHELF="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/patchelf" /home/huaxi/openwrt/openwrt-15.05.1/scripts/rstrip.sh /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc/lib/libgcc_s.so.1: shared object (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm; ) install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base /home/huaxi/openwrt/openwrt-15.05.1/scripts/ipkg-build -c -o 0 -g 0 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base Packaged contents of /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libgcc into /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/libgcc_4.8-linaro-1_realview.ipk mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/CONTROL /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/ld*-uClibc.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/ld*-uClibc-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libuClibc-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/ for file in libcrypt libdl libm libutil; do cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/$file.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/$file-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/; done cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libuClibc-* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libm-* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libcrypt-* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/ find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf export CROSS="arm-openwrt-linux-uclibcgnueabi-" NO_RENAME=1 ; NM="arm-openwrt-linux-uclibcgnueabi-nm" STRIP="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/sstrip" STRIP_KMOD="/home/huaxi/openwrt/openwrt-15.05.1/scripts/strip-kmod.sh" PATCHELF="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/patchelf" /home/huaxi/openwrt/openwrt-15.05.1/scripts/rstrip.sh /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/libdl-0.9.33.2.so: shared object rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/libutil-0.9.33.2.so: shared object rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/libuClibc-0.9.33.2.so: shared object rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/libcrypt-0.9.33.2.so: shared object rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/libm-0.9.33.2.so: shared object rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/lib/ld-uClibc-0.9.33.2.so: shared object (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm; ) install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base /home/huaxi/openwrt/openwrt-15.05.1/scripts/ipkg-build -c -o 0 -g 0 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base Packaged contents of /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libc into /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/libc_0.9.33.2-1_realview.ipk rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/ld*-uClibc.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/ld*-uClibc-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libuClibc-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/ for file in libcrypt libdl libm libutil; do cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/$file.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/$file-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/; done cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libuClibc-* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libm-* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/libcrypt-* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread_so.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libnsl_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc_so.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libsupc++.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libthread_db_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libm.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libcrypt.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread_nonshared.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread_nonshared_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libatomic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libitm.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libthread_db.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libutil.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/librt_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libnsl.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libutil_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libcrypt_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libresolv.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libstdc++.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/librt.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libm_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libdl.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libc_so.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/libc_pic.a cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/libgcc_pic.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/libgcc_s_pic.a; cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3/libgcc.map /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/lib/libgcc_s_pic.map SHELL= /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/flock /home/huaxi/openwrt/openwrt-15.05.1/tmp/.root-copy.flock -c 'cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc/. /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/' rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libc touch /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp/.libc_installed if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libgcc_s.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc/lib/ SHELL= /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/flock /home/huaxi/openwrt/openwrt-15.05.1/tmp/.root-copy.flock -c 'cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc/. /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/' rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libgcc touch /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp/.libgcc_installed if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread/CONTROL /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread/lib/ find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf export CROSS="arm-openwrt-linux-uclibcgnueabi-" NO_RENAME=1 ; NM="arm-openwrt-linux-uclibcgnueabi-nm" STRIP="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/sstrip" STRIP_KMOD="/home/huaxi/openwrt/openwrt-15.05.1/scripts/strip-kmod.sh" PATCHELF="/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/patchelf" /home/huaxi/openwrt/openwrt-15.05.1/scripts/rstrip.sh /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread rstrip.sh: /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread/lib/libpthread-0.9.33.2.so: shared object (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm; ) install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base /home/huaxi/openwrt/openwrt-15.05.1/scripts/ipkg-build -c -o 0 -g 0 /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base Packaged contents of /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/toolchain/ipkg-realview/libpthread into /home/huaxi/openwrt/openwrt-15.05.1/bin/realview/packages/base/libpthread_0.9.33.2-1_realview.ipk rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread install -d -m0755 /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread/lib cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread.so.* /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread-0.9.33.2.so /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread/lib/ cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib/libpthread_so.a /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread/lib/libpthread_pic.a SHELL= /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/host/bin/flock /home/huaxi/openwrt/openwrt-15.05.1/tmp/.root-copy.flock -c 'cp -fpR /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread/. /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/' rm -rf /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-libpthread touch /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp/.libpthread_installed if [ -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean ]; then rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/pkginfo/toolchain.default.install make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/libs/toolchain' make[2]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' mkdir -p /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0 cp -fpR -u ./src/* /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.prepared_6a6ac8c802d5ab0875d7e90bbacf19c9 rm -f /home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/._installed (cd /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/./; if [ -x ./configure ]; then find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.guess | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.guess; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r chmod u+w; find /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/ -name config.sub | xargs -r -n1 cp --remove-destination /home/huaxi/openwrt/openwrt-15.05.1/scripts/config.sub; AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard " CPPFLAGS="-I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; ) rm -f /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_* touch /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/.configured_yyy CFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " CXXFLAGS="-Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/home/huaxi/openwrt/openwrt-15.05.1/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " make -j1 -C /home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0/. AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv6k -mtune=mpcore -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CROSS="arm-openwrt-linux-uclibcgnueabi-" ARCH="arm" ; make[3]: Entering directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' arm-openwrt-linux-uclibcgnueabi-gcc -Wall main.c A.c B.c -o shared_memory cc1: note: someone does not honour COPTS correctly, passed 0 times cc1: note: someone does not honour COPTS correctly, passed 0 times A.c: In function 'sender_process': A.c:133:5: warning: 'return' with a value, in function returning void [enabled by default] return 0; ^ cc1: note: someone does not honour COPTS correctly, passed 0 times B.c: In function 'receiver_process': B.c:114:5: warning: 'return' with a value, in function returning void [enabled by default] return 0; ^ /tmp/ccikabGd.o: In function `semaphore_operation': A.c:(.text+0x78): multiple definition of `semaphore_operation' /tmp/ccQBh6at.o:main.c:(.text+0x0): first defined here /tmp/ccT6mCdY.o: In function `semaphore_operation': B.c:(.text+0x0): multiple definition of `semaphore_operation' /tmp/ccQBh6at.o:main.c:(.text+0x0): first defined here collect2: error: ld returned 1 exit status Makefile:10: recipe for target 'shared_memory' failed make[3]: *** [shared_memory] Error 1 make[3]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/shared_memory-1.0' Makefile:31: recipe for target '/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built' failed make[2]: *** [/home/huaxi/openwrt/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi//.built] Error 2 make[2]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1/package/shared_memory' package/Makefile:191: recipe for target 'package/shared_memory/compile' failed make[1]: *** [package/shared_memory/compile] Error 2 make[1]: Leaving directory '/home/huaxi/openwrt/openwrt-15.05.1' /home/huaxi/openwrt/openwrt-15.05.1/include/toplevel.mk:181: recipe for target 'package/shared_memory/compile' failed make: *** [package/shared_memory/compile] Error 2 huaxi@ubuntu:~/openwrt/openwrt-15.05.1$
08-20
(.venv) PS E:\PyTorch_Build\pytorch\build> # 搜索整个构建目录中的所有构建文件 (.venv) PS E:\PyTorch_Build\pytorch\build> $buildRoot = "E:\PyTorch_Build\pytorch\build" (.venv) PS E:\PyTorch_Build\pytorch\build> $allBuildFiles = Get-ChildItem -Path $buildRoot -Recurse -Include *.pyd, *.dll, *.lib (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> if ($allBuildFiles.Count -eq 0) { >> # 如果没有找到任何构建文件,重新运行构建过程 >> Write-Host "未找到任何构建文件,重新运行构建过程..." >> cd "E:\PyTorch_Build\pytorch" >> python setup.py install >> $allBuildFiles = Get-ChildItem -Path $buildRoot -Recurse -Include *.pyd, *.dll, *.lib >> } (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> # 打印找到的文件 (.venv) PS E:\PyTorch_Build\pytorch\build> Write-Host "找到的构建文件:" 找到的构建文件: (.venv) PS E:\PyTorch_Build\pytorch\build> $allBuildFiles | ForEach-Object { Write-Host " - $($_.FullName)" } - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\charset_normalizer\md__mypyc.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\charset_normalizer\md.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\markupsafe\_speedups.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\lib\npymath.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_multiarray_tests.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_multiarray_tests.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_multiarray_umath.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_multiarray_umath.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_operand_flag_tests.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_operand_flag_tests.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_rational_tests.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_rational_tests.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_simd.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_simd.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_struct_ufunc_tests.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_struct_ufunc_tests.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_umath_tests.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\_core\_umath_tests.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\fft\_pocketfft_umath.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\fft\_pocketfft_umath.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\linalg\_umath_linalg.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\linalg\_umath_linalg.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\linalg\lapack_lite.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\linalg\lapack_lite.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\lib\npyrandom.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_bounded_integers.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_bounded_integers.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_common.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_common.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_generator.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_generator.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_mt19937.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_mt19937.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_pcg64.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_pcg64.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_philox.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_philox.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_sfc64.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\_sfc64.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\bit_generator.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\bit_generator.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\mtrand.cp310-win_amd64.lib - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy\random\mtrand.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy.libs\libscipy_openblas64_-13e2df515630b4a41f92893938845698.dll - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\numpy.libs\msvcp140-263139962577ecda4cd9469ca360a746.dll - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\optree\_C.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\psutil\_psutil_windows.pyd - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\yaml\_yaml.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\bin\c10_cuda.dll - E:\PyTorch_Build\pytorch\build\bin\c10.dll - E:\PyTorch_Build\pytorch\build\bin\caffe2_nvrtc.dll - E:\PyTorch_Build\pytorch\build\bin\nnapi_backend.dll - E:\PyTorch_Build\pytorch\build\bin\shm.dll - E:\PyTorch_Build\pytorch\build\bin\torch_cpu.dll - E:\PyTorch_Build\pytorch\build\bin\torch_cuda.dll - E:\PyTorch_Build\pytorch\build\bin\torch_global_deps.dll - E:\PyTorch_Build\pytorch\build\bin\torch_python.dll - E:\PyTorch_Build\pytorch\build\bin\torch.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-console-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-datetime-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-debug-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-errorhandling-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-file-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-file-l1-2-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-file-l2-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-handle-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-heap-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-interlocked-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-libraryloader-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-localization-l1-2-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-memory-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-namedpipe-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-processenvironment-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-processthreads-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-processthreads-l1-1-1.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-profile-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-rtlsupport-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-string-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-synch-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-synch-l1-2-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-sysinfo-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-timezone-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-core-util-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-conio-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-convert-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-environment-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-filesystem-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-heap-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-locale-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-math-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-multibyte-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-private-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-process-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-runtime-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-stdio-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-string-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-time-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\api-ms-win-crt-utility-l1-1-0.dll - E:\PyTorch_Build\pytorch\build\Dependencies\ClrPhlib.dll - E:\PyTorch_Build\pytorch\build\Dependencies\dbghelp.dll - E:\PyTorch_Build\pytorch\build\Dependencies\DependenciesLib.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Dragablz.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Mono.Cecil.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Mono.Cecil.Mdb.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Mono.Cecil.Pdb.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Mono.Cecil.Rocks.dll - E:\PyTorch_Build\pytorch\build\Dependencies\MSVCP140.dll - E:\PyTorch_Build\pytorch\build\Dependencies\NDesk.Options.dll - E:\PyTorch_Build\pytorch\build\Dependencies\Newtonsoft.Json.dll - E:\PyTorch_Build\pytorch\build\Dependencies\ucrtbase.dll - E:\PyTorch_Build\pytorch\build\Dependencies\VCRUNTIME140_1.dll - E:\PyTorch_Build\pytorch\build\Dependencies\VCRUNTIME140.dll - E:\PyTorch_Build\pytorch\build\functorch\functorch.pyd - E:\PyTorch_Build\pytorch\build\lib\c10_cuda.lib - E:\PyTorch_Build\pytorch\build\lib\c10.lib - E:\PyTorch_Build\pytorch\build\lib\caffe2_nvrtc.lib - E:\PyTorch_Build\pytorch\build\lib\Caffe2_perfkernels_avx2.lib - E:\PyTorch_Build\pytorch\build\lib\cpuinfo_internals.lib - E:\PyTorch_Build\pytorch\build\lib\cpuinfo.lib - E:\PyTorch_Build\pytorch\build\lib\fmt.lib - E:\PyTorch_Build\pytorch\build\lib\functorch.lib - E:\PyTorch_Build\pytorch\build\lib\kineto.lib - E:\PyTorch_Build\pytorch\build\lib\libittnotify.lib - E:\PyTorch_Build\pytorch\build\lib\libjitprofiling.lib - E:\PyTorch_Build\pytorch\build\lib\libprotobuf-lite.lib - E:\PyTorch_Build\pytorch\build\lib\libprotobuf.lib - E:\PyTorch_Build\pytorch\build\lib\libprotoc.lib - E:\PyTorch_Build\pytorch\build\lib\microkernels-all.lib - E:\PyTorch_Build\pytorch\build\lib\microkernels-prod.lib - E:\PyTorch_Build\pytorch\build\lib\mimalloc.lib - E:\PyTorch_Build\pytorch\build\lib\nnapi_backend.lib - E:\PyTorch_Build\pytorch\build\lib\onnx_proto.lib - E:\PyTorch_Build\pytorch\build\lib\onnx.lib - E:\PyTorch_Build\pytorch\build\lib\pthreadpool.lib - E:\PyTorch_Build\pytorch\build\lib\shm.lib - E:\PyTorch_Build\pytorch\build\lib\torch_cpu.lib - E:\PyTorch_Build\pytorch\build\lib\torch_cuda.lib - E:\PyTorch_Build\pytorch\build\lib\torch_python.lib - E:\PyTorch_Build\pytorch\build\lib\torch.lib - E:\PyTorch_Build\pytorch\build\lib\XNNPACK.lib - E:\PyTorch_Build\pytorch\build\lib.win-amd64-cpython-310\functorch\_C.cp310-win_amd64.pyd - E:\PyTorch_Build\pytorch\build\sleef\lib\sleef.lib (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> $torchDir = "E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\torch" (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> foreach ($file in $allBuildFiles) { >> # 创建目标路径的目录结构 >> $relativePath = $file.FullName.Substring($buildRoot.Length) >> $destPath = Join-Path $torchDir $relativePath >> $destDir = [System.IO.Path]::GetDirectoryName($destPath) >> >> if (-not (Test-Path $destDir)) { >> New-Item -ItemType Directory -Path $destDir -Force | Out-Null >> } >> >> # 复制文件 >> Copy-Item -Path $file.FullName -Destination $destPath -Force >> Write-Host "已复制: $($file.Name) -> $relativePath" >> } 已复制: md__mypyc.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\charset_normalizer\md__mypyc.cp310-win_amd64.pyd 已复制: md.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\charset_normalizer\md.cp310-win_amd64.pyd 已复制: _speedups.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\markupsafe\_speedups.cp310-win_amd64.pyd 已复制: npymath.lib -> \.venv\Lib\site-packages\numpy\_core\lib\npymath.lib 已复制: _multiarray_tests.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_multiarray_tests.cp310-win_amd64.lib 已复制: _multiarray_tests.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_multiarray_tests.cp310-win_amd64.pyd 已复制: _multiarray_umath.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_multiarray_umath.cp310-win_amd64.lib 已复制: _multiarray_umath.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_multiarray_umath.cp310-win_amd64.pyd 已复制: _operand_flag_tests.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_operand_flag_tests.cp310-win_amd64.lib 已复制: _operand_flag_tests.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_operand_flag_tests.cp310-win_amd64.pyd 已复制: _rational_tests.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_rational_tests.cp310-win_amd64.lib 已复制: _rational_tests.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_rational_tests.cp310-win_amd64.pyd 已复制: _simd.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_simd.cp310-win_amd64.lib 已复制: _simd.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_simd.cp310-win_amd64.pyd 已复制: _struct_ufunc_tests.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_struct_ufunc_tests.cp310-win_amd64.lib 已复制: _struct_ufunc_tests.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_struct_ufunc_tests.cp310-win_amd64.pyd 已复制: _umath_tests.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\_core\_umath_tests.cp310-win_amd64.lib 已复制: _umath_tests.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\_core\_umath_tests.cp310-win_amd64.pyd 已复制: _pocketfft_umath.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\fft\_pocketfft_umath.cp310-win_amd64.lib 已复制: _pocketfft_umath.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\fft\_pocketfft_umath.cp310-win_amd64.pyd 已复制: _umath_linalg.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\linalg\_umath_linalg.cp310-win_amd64.lib 已复制: _umath_linalg.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\linalg\_umath_linalg.cp310-win_amd64.pyd 已复制: lapack_lite.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\linalg\lapack_lite.cp310-win_amd64.lib 已复制: lapack_lite.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\linalg\lapack_lite.cp310-win_amd64.pyd 已复制: npyrandom.lib -> \.venv\Lib\site-packages\numpy\random\lib\npyrandom.lib 已复制: _bounded_integers.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_bounded_integers.cp310-win_amd64.lib 已复制: _bounded_integers.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_bounded_integers.cp310-win_amd64.pyd 已复制: _common.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_common.cp310-win_amd64.lib 已复制: _common.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_common.cp310-win_amd64.pyd 已复制: _generator.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_generator.cp310-win_amd64.lib 已复制: _generator.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_generator.cp310-win_amd64.pyd 已复制: _mt19937.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_mt19937.cp310-win_amd64.lib 已复制: _mt19937.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_mt19937.cp310-win_amd64.pyd 已复制: _pcg64.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_pcg64.cp310-win_amd64.lib 已复制: _pcg64.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_pcg64.cp310-win_amd64.pyd 已复制: _philox.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_philox.cp310-win_amd64.lib 已复制: _philox.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_philox.cp310-win_amd64.pyd 已复制: _sfc64.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\_sfc64.cp310-win_amd64.lib 已复制: _sfc64.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\_sfc64.cp310-win_amd64.pyd 已复制: bit_generator.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\bit_generator.cp310-win_amd64.lib 已复制: bit_generator.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\bit_generator.cp310-win_amd64.pyd 已复制: mtrand.cp310-win_amd64.lib -> \.venv\Lib\site-packages\numpy\random\mtrand.cp310-win_amd64.lib 已复制: mtrand.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\numpy\random\mtrand.cp310-win_amd64.pyd 已复制: libscipy_openblas64_-13e2df515630b4a41f92893938845698.dll -> \.venv\Lib\site-packages\numpy.libs\libscipy_openblas64_-13e2df515630b4a41f92893938845698.dll 已复制: msvcp140-263139962577ecda4cd9469ca360a746.dll -> \.venv\Lib\site-packages\numpy.libs\msvcp140-263139962577ecda4cd9469ca360a746.dll 已复制: _C.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\optree\_C.cp310-win_amd64.pyd 已复制: _psutil_windows.pyd -> \.venv\Lib\site-packages\psutil\_psutil_windows.pyd 已复制: _yaml.cp310-win_amd64.pyd -> \.venv\Lib\site-packages\yaml\_yaml.cp310-win_amd64.pyd 已复制: c10_cuda.dll -> \bin\c10_cuda.dll 已复制: c10.dll -> \bin\c10.dll 已复制: caffe2_nvrtc.dll -> \bin\caffe2_nvrtc.dll 已复制: nnapi_backend.dll -> \bin\nnapi_backend.dll 已复制: shm.dll -> \bin\shm.dll 已复制: torch_cpu.dll -> \bin\torch_cpu.dll 已复制: torch_cuda.dll -> \bin\torch_cuda.dll 已复制: torch_global_deps.dll -> \bin\torch_global_deps.dll 已复制: torch_python.dll -> \bin\torch_python.dll 已复制: torch.dll -> \bin\torch.dll 已复制: api-ms-win-core-console-l1-1-0.dll -> \Dependencies\api-ms-win-core-console-l1-1-0.dll 已复制: api-ms-win-core-datetime-l1-1-0.dll -> \Dependencies\api-ms-win-core-datetime-l1-1-0.dll 已复制: api-ms-win-core-debug-l1-1-0.dll -> \Dependencies\api-ms-win-core-debug-l1-1-0.dll 已复制: api-ms-win-core-errorhandling-l1-1-0.dll -> \Dependencies\api-ms-win-core-errorhandling-l1-1-0.dll 已复制: api-ms-win-core-file-l1-1-0.dll -> \Dependencies\api-ms-win-core-file-l1-1-0.dll 已复制: api-ms-win-core-file-l1-2-0.dll -> \Dependencies\api-ms-win-core-file-l1-2-0.dll 已复制: api-ms-win-core-file-l2-1-0.dll -> \Dependencies\api-ms-win-core-file-l2-1-0.dll 已复制: api-ms-win-core-handle-l1-1-0.dll -> \Dependencies\api-ms-win-core-handle-l1-1-0.dll 已复制: api-ms-win-core-heap-l1-1-0.dll -> \Dependencies\api-ms-win-core-heap-l1-1-0.dll 已复制: api-ms-win-core-interlocked-l1-1-0.dll -> \Dependencies\api-ms-win-core-interlocked-l1-1-0.dll 已复制: api-ms-win-core-libraryloader-l1-1-0.dll -> \Dependencies\api-ms-win-core-libraryloader-l1-1-0.dll 已复制: api-ms-win-core-localization-l1-2-0.dll -> \Dependencies\api-ms-win-core-localization-l1-2-0.dll 已复制: api-ms-win-core-memory-l1-1-0.dll -> \Dependencies\api-ms-win-core-memory-l1-1-0.dll 已复制: api-ms-win-core-namedpipe-l1-1-0.dll -> \Dependencies\api-ms-win-core-namedpipe-l1-1-0.dll 已复制: api-ms-win-core-processenvironment-l1-1-0.dll -> \Dependencies\api-ms-win-core-processenvironment-l1-1-0.dll 已复制: api-ms-win-core-processthreads-l1-1-0.dll -> \Dependencies\api-ms-win-core-processthreads-l1-1-0.dll 已复制: api-ms-win-core-processthreads-l1-1-1.dll -> \Dependencies\api-ms-win-core-processthreads-l1-1-1.dll 已复制: api-ms-win-core-profile-l1-1-0.dll -> \Dependencies\api-ms-win-core-profile-l1-1-0.dll 已复制: api-ms-win-core-rtlsupport-l1-1-0.dll -> \Dependencies\api-ms-win-core-rtlsupport-l1-1-0.dll 已复制: api-ms-win-core-string-l1-1-0.dll -> \Dependencies\api-ms-win-core-string-l1-1-0.dll 已复制: api-ms-win-core-synch-l1-1-0.dll -> \Dependencies\api-ms-win-core-synch-l1-1-0.dll 已复制: api-ms-win-core-synch-l1-2-0.dll -> \Dependencies\api-ms-win-core-synch-l1-2-0.dll 已复制: api-ms-win-core-sysinfo-l1-1-0.dll -> \Dependencies\api-ms-win-core-sysinfo-l1-1-0.dll 已复制: api-ms-win-core-timezone-l1-1-0.dll -> \Dependencies\api-ms-win-core-timezone-l1-1-0.dll 已复制: api-ms-win-core-util-l1-1-0.dll -> \Dependencies\api-ms-win-core-util-l1-1-0.dll 已复制: api-ms-win-crt-conio-l1-1-0.dll -> \Dependencies\api-ms-win-crt-conio-l1-1-0.dll 已复制: api-ms-win-crt-convert-l1-1-0.dll -> \Dependencies\api-ms-win-crt-convert-l1-1-0.dll 已复制: api-ms-win-crt-environment-l1-1-0.dll -> \Dependencies\api-ms-win-crt-environment-l1-1-0.dll 已复制: api-ms-win-crt-filesystem-l1-1-0.dll -> \Dependencies\api-ms-win-crt-filesystem-l1-1-0.dll 已复制: api-ms-win-crt-heap-l1-1-0.dll -> \Dependencies\api-ms-win-crt-heap-l1-1-0.dll 已复制: api-ms-win-crt-locale-l1-1-0.dll -> \Dependencies\api-ms-win-crt-locale-l1-1-0.dll 已复制: api-ms-win-crt-math-l1-1-0.dll -> \Dependencies\api-ms-win-crt-math-l1-1-0.dll 已复制: api-ms-win-crt-multibyte-l1-1-0.dll -> \Dependencies\api-ms-win-crt-multibyte-l1-1-0.dll 已复制: api-ms-win-crt-private-l1-1-0.dll -> \Dependencies\api-ms-win-crt-private-l1-1-0.dll 已复制: api-ms-win-crt-process-l1-1-0.dll -> \Dependencies\api-ms-win-crt-process-l1-1-0.dll 已复制: api-ms-win-crt-runtime-l1-1-0.dll -> \Dependencies\api-ms-win-crt-runtime-l1-1-0.dll 已复制: api-ms-win-crt-stdio-l1-1-0.dll -> \Dependencies\api-ms-win-crt-stdio-l1-1-0.dll 已复制: api-ms-win-crt-string-l1-1-0.dll -> \Dependencies\api-ms-win-crt-string-l1-1-0.dll 已复制: api-ms-win-crt-time-l1-1-0.dll -> \Dependencies\api-ms-win-crt-time-l1-1-0.dll 已复制: api-ms-win-crt-utility-l1-1-0.dll -> \Dependencies\api-ms-win-crt-utility-l1-1-0.dll 已复制: ClrPhlib.dll -> \Dependencies\ClrPhlib.dll 已复制: dbghelp.dll -> \Dependencies\dbghelp.dll 已复制: DependenciesLib.dll -> \Dependencies\DependenciesLib.dll 已复制: Dragablz.dll -> \Dependencies\Dragablz.dll 已复制: Mono.Cecil.dll -> \Dependencies\Mono.Cecil.dll 已复制: Mono.Cecil.Mdb.dll -> \Dependencies\Mono.Cecil.Mdb.dll 已复制: Mono.Cecil.Pdb.dll -> \Dependencies\Mono.Cecil.Pdb.dll 已复制: Mono.Cecil.Rocks.dll -> \Dependencies\Mono.Cecil.Rocks.dll 已复制: MSVCP140.dll -> \Dependencies\MSVCP140.dll 已复制: NDesk.Options.dll -> \Dependencies\NDesk.Options.dll 已复制: Newtonsoft.Json.dll -> \Dependencies\Newtonsoft.Json.dll 已复制: ucrtbase.dll -> \Dependencies\ucrtbase.dll 已复制: VCRUNTIME140_1.dll -> \Dependencies\VCRUNTIME140_1.dll 已复制: VCRUNTIME140.dll -> \Dependencies\VCRUNTIME140.dll 已复制: functorch.pyd -> \functorch\functorch.pyd 已复制: c10_cuda.lib -> \lib\c10_cuda.lib 已复制: c10.lib -> \lib\c10.lib 已复制: caffe2_nvrtc.lib -> \lib\caffe2_nvrtc.lib 已复制: Caffe2_perfkernels_avx2.lib -> \lib\Caffe2_perfkernels_avx2.lib 已复制: cpuinfo_internals.lib -> \lib\cpuinfo_internals.lib 已复制: cpuinfo.lib -> \lib\cpuinfo.lib 已复制: fmt.lib -> \lib\fmt.lib 已复制: functorch.lib -> \lib\functorch.lib 已复制: kineto.lib -> \lib\kineto.lib 已复制: libittnotify.lib -> \lib\libittnotify.lib 已复制: libjitprofiling.lib -> \lib\libjitprofiling.lib 已复制: libprotobuf-lite.lib -> \lib\libprotobuf-lite.lib 已复制: libprotobuf.lib -> \lib\libprotobuf.lib 已复制: libprotoc.lib -> \lib\libprotoc.lib 已复制: microkernels-all.lib -> \lib\microkernels-all.lib 已复制: microkernels-prod.lib -> \lib\microkernels-prod.lib 已复制: mimalloc.lib -> \lib\mimalloc.lib 已复制: nnapi_backend.lib -> \lib\nnapi_backend.lib 已复制: onnx_proto.lib -> \lib\onnx_proto.lib 已复制: onnx.lib -> \lib\onnx.lib 已复制: pthreadpool.lib -> \lib\pthreadpool.lib 已复制: shm.lib -> \lib\shm.lib 已复制: torch_cpu.lib -> \lib\torch_cpu.lib 已复制: torch_cuda.lib -> \lib\torch_cuda.lib 已复制: torch_python.lib -> \lib\torch_python.lib 已复制: torch.lib -> \lib\torch.lib 已复制: XNNPACK.lib -> \lib\XNNPACK.lib 已复制: _C.cp310-win_amd64.pyd -> \lib.win-amd64-cpython-310\functorch\_C.cp310-win_amd64.pyd 已复制: sleef.lib -> \sleef\lib\sleef.lib (.venv) PS E:\PyTorch_Build\pytorch\build> # 验证核心文件是否已复制 (.venv) PS E:\PyTorch_Build\pytorch\build> $criticalFiles = @( >> "_C.pyd", >> "_C_flatbuffer.pyd", >> "torch_python.dll", >> "c10.dll", >> "c10_cuda.dll" >> ) (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> foreach ($file in $criticalFiles) { >> $filePath = Join-Path $torchDir $file >> if (Test-Path $filePath) { >> Write-Host "[成功] 核心文件存在: $file" >> } else { >> Write-Host "[错误] 核心文件缺失: $file" >> >> # 尝试搜索整个系统 >> $found = Get-ChildItem -Path $buildRoot -Recurse -Filter $file -ErrorAction SilentlyContinue >> if ($found) { >> Write-Host " 文件位于: $($found.FullName)" >> Copy-Item -Path $found.FullName -Destination $torchDir -Force >> Write-Host " 已手动复制文件" >> } else { >> Write-Host " 系统中未找到此文件" >> } >> } >> } [错误] 核心文件缺失: _C.pyd 系统中未找到此文件 [错误] 核心文件缺失: _C_flatbuffer.pyd 系统中未找到此文件 [错误] 核心文件缺失: torch_python.dll 文件位于: E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\torch\bin\torch_python.dll E:\PyTorch_Build\pytorch\build\bin\torch_python.dll 已手动复制文件 [错误] 核心文件缺失: c10.dll 文件位于: E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\torch\bin\c10.dll E:\PyTorch_Build\pytorch\build\bin\c10.dll 已手动复制文件 [错误] 核心文件缺失: c10_cuda.dll 文件位于: E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages\torch\bin\c10_cuda.dll E:\PyTorch_Build\pytorch\build\bin\c10_cuda.dll 已手动复制文件 (.venv) PS E:\PyTorch_Build\pytorch\build> # 保存为 check_build.ps1 (.venv) PS E:\PyTorch_Build\pytorch\build> $buildRoot = "E:\PyTorch_Build\pytorch\build" (.venv) PS E:\PyTorch_Build\pytorch\build> $requiredFiles = @( >> "lib.win-amd64-cpython-310\torch\_C.pyd", >> "lib.win-amd64-cpython-310\torch\lib\c10.dll", >> "lib.win-amd64-cpython-310\torch\lib\torch_cuda.dll" >> ) (.venv) PS E:\PyTorch_Build\pytorch\build> (.venv) PS E:\PyTorch_Build\pytorch\build> Write-Host "=== 构建完整性检查 ===" === 构建完整性检查 === (.venv) PS E:\PyTorch_Build\pytorch\build> foreach ($file in $requiredFiles) { >> $fullPath = Join-Path $buildRoot $file >> $exists = Test-Path $fullPath >> >> if ($exists) { >> Write-Host "[✓] $file" >> } else { >> Write-Host "[✗] $file" >> Write-Host " 文件缺失,请检查构建日志" >> >> # 检查构建日志 >> $logPath = Join-Path $buildRoot "build.log" >> if (Test-Path $logPath) { >> $errorLines = Get-Content $logPath | Select-String "error" -CaseSensitive >> if ($errorLines) { >> Write-Host " 构建日志中的错误:" >> $errorLines | Select-Object -First 5 | ForEach-Object { Write-Host " $_" } >> } >> } >> } >> } [✗] lib.win-amd64-cpython-310\torch\_C.pyd 文件缺失,请检查构建日志 [✗] lib.win-amd64-cpython-310\torch\lib\c10.dll 文件缺失,请检查构建日志 [✗] lib.win-amd64-cpython-310\torch\lib\torch_cuda.dll 文件缺失,请检查构建日志 (.venv) PS E:\PyTorch_Build\pytorch\build> # 查看构建日志 (.venv) PS E:\PyTorch_Build\pytorch\build> Get-Content "E:\PyTorch_Build\pytorch\build\build.log" -Tail 50 Get-Content: Cannot find path 'E:\PyTorch_Build\pytorch\build\build.log' because it does not exist. (.venv) PS E:\PyTorch_Build\pytorch\build> # 检查CUDA编译器 (.venv) PS E:\PyTorch_Build\pytorch\build> nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2025 NVIDIA Corporation Built on Wed_Jul_16_20:06:48_Pacific_Daylight_Time_2025 Cuda compilation tools, release 13.0, V13.0.48 Build cuda_13.0.r13.0/compiler.36260728_0 (.venv) PS E:\PyTorch_Build\pytorch\build> # 检查CUDA示例编译 (.venv) PS E:\PyTorch_Build\pytorch\build> cd "E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\extras\demo_suite" Set-Location: Cannot find path 'E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\extras\demo_suite' because it does not exist. (.venv) PS E:\PyTorch_Build\pytorch\build> .\bandwidthTest.exe .\bandwidthTest.exe: The term '.\bandwidthTest.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (.venv) PS E:\PyTorch_Build\pytorch\build> # 检查Python开发头文件 (.venv) PS E:\PyTorch_Build\pytorch\build> python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))" E:\Python310\Include (.venv) PS E:\PyTorch_Build\pytorch\build> # 检查MSVC编译器 (.venv) PS E:\PyTorch_Build\pytorch\build> cl.exe /? cl.exe: The term 'cl.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (.venv) PS E:\PyTorch_Build\pytorch\build> # 运行所有检查 (.venv) PS E:\PyTorch_Build\pytorch\build> .\check_build.ps1 .\check_build.ps1: The term '.\check_build.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. (.venv) PS E:\PyTorch_Build\pytorch\build> python torch_diagnose.py ================================================== PyTorch 环境诊断工具 ================================================== [系统信息] 操作系统: Windows-10-10.0.26100-SP0 Python版本: 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] Python路径: E:\PyTorch_Build\pytorch\build\.venv\Scripts\python.exe 工作目录: E:\PyTorch_Build\pytorch\build [环境变量] PATH: E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\PyTorch_Build\pytorch\build\lib;E:\OpenBLAS\bin;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\PyTorch_Build\pytorch\build\.venv\Scripts;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;C:\Program Files\PowerShell\7;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\x64;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\x64;;E:\PyTorch_Build\pytorch\build\lib.win-amd64-cpython-310\torch\lib;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin;C:\Users\Administrator\AppData\Local\Microsoft\dotnet;C:\Users\Administrator\AppData\Local\Microsoft\dotnet;C:\Users\Administrator\AppData\Local\Microsoft\dotnet\;C:\Program Files\dotnet;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;E:\Python310;C:\Program Files\dotnet\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\.dotnet\tools;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\.dotnet\tools;E:\Python310\Scripts;E:\Python310\Scripts;C:\Program Files\PowerShell\7\;E:\Program Files\Microsoft VS Code\bin;E:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2025.3.0\;E:\Program Files\CMake\bin;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Incredibuild;E:\PyTorch_Build\pytorch\build\lib.win-amd64-cpython-310\torch\lib;E:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\ProgramData\chocolatey\bin;E:\Program Files\Rust\.cargo\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\.dotnet\tools PYTHONPATH: E:\PyTorch_Build\pytorch Torch目录: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch [核心文件检查] [✗] 文件存在: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch\_C.pyd [✗] 文件存在: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch\_C_flatbuffer.pyd [✓] 文件存在: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch\torch_python.dll [✓] 文件存在: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch\c10.dll [✓] 文件存在: E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages\torch\c10_cuda.dll [DLL依赖检查] [✗] DLL加载失败: _C.pyd - Could not find module '_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax. [✗] DLL加载失败: _C_flatbuffer.pyd - Could not find module '_C_flatbuffer.pyd' (or one of its dependencies). Try using the full path with constructor syntax. [✗] DLL加载失败: torch_python.dll - Could not find module 'torch_python.dll' (or one of its dependencies). Try using the full path with constructor syntax. [✗] DLL加载失败: c10.dll - Could not find module 'c10.dll' (or one of its dependencies). Try using the full path with constructor syntax. [✗] DLL加载失败: c10_cuda.dll - Could not find module 'c10_cuda.dll' (or one of its dependencies). Try using the full path with constructor syntax. [模块导入测试] [✗] 模块导入失败: torch - DLL load failed while importing _C: 找不到指定的模块。 [错误详情] Traceback (most recent call last): File "E:\PyTorch_Build\pytorch\build\torch_diagnose.py", line 83, in main import torch File "E:\PyTorch_Build\pytorch\torch\__init__.py", line 423, in <module> from torch._C import * # noqa: F403 ImportError: DLL load failed while importing _C: 找不到指定的模块。 [调试信息] Python库路径: - E:\Python310\lib - E:\PyTorch_Build\pytorch\build\.venv\lib\site-packages PATH中的关键目录: - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\PyTorch_Build\pytorch\build\.venv\Lib\site-packages - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\PyTorch_Build\pytorch\build\lib - E:\OpenBLAS\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\PyTorch_Build\pytorch\build\.venv\Scripts - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\x64 - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin\x64 - E:\PyTorch_Build\pytorch\build\lib.win-amd64-cpython-310\torch\lib - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin - E:\Program Files\Microsoft VS Code\bin - E:\Program Files\CMake\bin - C:\Program Files\Microsoft SQL Server\150\Tools\Binn\ - C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\ - E:\PyTorch_Build\pytorch\build\lib.win-amd64-cpython-310\torch\lib - C:\ProgramData\chocolatey\bin - E:\Program Files\Rust\.cargo\bin (.venv) PS E:\PyTorch_Build\pytorch\build>
09-02
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值