posts - 88, comments - 3, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          Two compile issues i got:

          One issue is:
              uuid_gen_unix.c: In function 'axutil_uuid_gen_v1':uuid_gen_unix.c:62:20: error: variable 'tv' set but not used [-Werror=unused-but-set-variable]     struct timeval tv;                    ^cc1: all warnings being treated as errors    


          Solution is remove "-Werror" in all configure scripts
          find -type f -name configure -exec sed -i '/CFLAGS/s/-Werror//g' {} \;
          Another issue is:
          /usr/bin/ld: test.o: undefined reference to symbol 'axiom_xml_reader_free'
          /usr/local/axis2c/lib/libaxis2_parser.so
          .0: error adding symbols: DSO missing from command line
          collect2: error: ld returned 
          1 exit status
          make
          [4]: *** [test] Error 1
          make
          [4]: Leaving directory `/home/miaoyachun/softwares/test/axis2c-src-1.6.0/neethi/test'

          As suggested in https://code.google.com/p/staff/issues/detail?id=198, the solution is disable neethi/test in following files:
          • neethi/configure, remove all "test/Makefile"
          • neethi/Makefile.am, update "SUBDIRS = src test" with "SUBDIRS = src"
          • neethi/Makefile.in, update "SUBDIRS = src test" with "SUBDIRS = src"

          Finally, you could run "make; sudo make install"" successfully. Last thing should be paid attention to is you may need copy all head files of neethi/include into /usr/local/axis2c/include/axis2-1.6.0/ which needed when you compile customized web service.

          Enjoining it!!

          posted @ 2015-08-21 11:00 Milo的海域 閱讀(533) | 評論 (0)編輯 收藏

          http://axis.apache.org/axis2/c/core/docs/axis2c_manual.html#client_api 的hello.c client 編譯命令在我的ubuntu 12.04s上總是報(bào)錯
          gcc -o hello -I$AXIS2C_HOME/include/axis2-1.6.0/ -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lpthread -laxis2_http_sender -laxis2_http_receiver -ldl -Wl,--rpath -Wl,$AXIS2C_HOME/lib hello.c
          /tmp/ccCYikFh.o: In function `main':
          hello.c:(.text+0x57): undefined reference to `axutil_env_create_all'
          hello.c:(.text+0x68): undefined reference to `axis2_options_create'
          hello.c:(.text+0x93): undefined reference to `axutil_strcmp'
          hello.c:(.text+0xeb): undefined reference to `axis2_endpoint_ref_create'
          hello.c:(.text+0x102): undefined reference to `axis2_options_set_to'
          hello.c:(.text+0x13d): undefined reference to `axis2_svc_client_create'
          hello.c:(.text+0x168): undefined reference to `axutil_error_get_message'
          hello.c:(.text+0x193): undefined reference to `axutil_log_impl_log_error'
          hello.c:(.text+0x1b1): undefined reference to `axis2_svc_client_set_options'
          hello.c:(.text+0x1d6): undefined reference to `axis2_svc_client_send_receive'
          hello.c:(.text+0x21d): undefined reference to `axiom_node_free_tree'
          hello.c:(.text+0x238): undefined reference to `axutil_error_get_message'
          hello.c:(.text+0x266): undefined reference to `axutil_log_impl_log_error'
          hello.c:(.text+0x28d): undefined reference to `axis2_svc_client_free'
          hello.c:(.text+0x2a8): undefined reference to `axutil_env_free'
          /tmp/ccCYikFh.o: In function `build_om_request':
          hello.c:(.text+0x2ed): undefined reference to `axiom_element_create'
          hello.c:(.text+0x307): undefined reference to `axiom_element_set_text'
          /tmp/ccCYikFh.o: In function `process_om_response':
          hello.c:(.text+0x337): undefined reference to `axiom_node_get_first_child'
          hello.c:(.text+0x351): undefined reference to `axiom_node_get_node_type'
          hello.c:(.text+0x367): undefined reference to `axiom_node_get_data_element'
          hello.c:(.text+0x381): undefined reference to `axiom_text_get_value'
          hello.c:(.text+0x396): undefined reference to `axiom_text_get_value'
          collect2: error: ld returned 
          1 exit status
          仔細(xì)檢查了gcc命令,頭文件,庫文件的路徑都是對的,最后跟同事討論才發(fā)現(xiàn)hello.c的位置的問題。。如果hello.c的位置放到了依賴庫的右面 就會報(bào)類似錯誤。但是官方的例子應(yīng)該是測試過的,怎么會有這個問題呢? 難道我的ubuntu 12.04的gcc比較嚴(yán)格?

          修正后的gcc命令如下
          gcc -o hello hello.c  -I$AXIS2C_HOME/include/axis2-1.6.0/ -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lpthread -laxis2_http_sender -laxis2_http_receiver -ldl -Wl,--rpath -Wl,$AXIS2C_HOME/lib

          posted @ 2015-08-18 17:59 Milo的海域 閱讀(350) | 評論 (0)編輯 收藏

          ubuntu 12.04s每次修改limit.conf文件后,要想讓所有的后繼ssession都能看到修改,一般要么重啟系統(tǒng),要么relogin系統(tǒng)。下面介紹一個不退出terminal就讓修改立刻生效的方式
          1. 修改/etc/pam.d/sudo,添加下面行到文件末尾
          session    required   pam_limits.so
          2. 修改 /etc/security/limits.conf, 比如
          root soft nofile 65535
          root hard nofile 
          65535
          3. 執(zhí)行sudo -i -u root 模擬登錄初始化

          另外發(fā)現(xiàn)centos 6系統(tǒng)/etc/pam.d/sudo已經(jīng)默認(rèn)enable pam_limits.so了,直接2,3就可以了。

          當(dāng)然如果用ssh重新登錄下可能來的更快。。因?yàn)?etc/pam.d/sshd默認(rèn)enable了pam_limits.so, 多輸入個密碼而已

          posted @ 2015-08-13 17:58 Milo的海域 閱讀(4601) | 評論 (0)編輯 收藏

          ss(shadowsocks) 是基于socks5的,但是android studio sdk manager只支持http代理,導(dǎo)致android studio無法更新sdk tools,解決方法就是polipo,可以將socks5轉(zhuǎn)換為http代理
          具體方法見
          https://github.com/shadowsocks/shadowsocks/wiki/Convert-Shadowsocks-into-an-HTTP-proxy

          posted @ 2015-06-28 21:50 Milo的海域 閱讀(1336) | 評論 (0)編輯 收藏

          ubuntu上ibus經(jīng)常出現(xiàn)不能輸入中文的情況,用下面命令可以臨時解決問題
          ibus-daemon -r &

          posted @ 2015-06-17 13:45 Milo的海域 閱讀(521) | 評論 (0)編輯 收藏

          從jdk7最開始的release version (http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html)的notes里看到

          Area: HotSpot
          Synopsis: In JDK 7, interned strings are no longer allocated in the permanent generation of the Java heap, but are instead allocated in the main part of the Java heap (known as the young and old generations), along with the other objects created by the application. This change will result in more data residing in the main Java heap, and less data in the permanent generation, and thus may require heap sizes to be adjusted. Most applications will see only relatively small differences in heap usage due to this change, but larger applications that load many classes or make heavy use of the String.intern() method will see more significant differences.
          RFE: 6962931

          posted @ 2015-05-06 17:35 Milo的海域 閱讀(1864) | 評論 (0)編輯 收藏

          今天有同事問為什么ubuntu上啟動jenkins失敗,我記得之前玩的時候并沒有出現(xiàn)這種情況,于是跟蹤了下,最終錯誤信息是:

          daemon: fatal: refusing to execute unsafe program: /usr/bin/java (/opt is group and world writable)

          根本原因是機(jī)器裝了多個版本的jdk, jdk所在的/opt父目錄的權(quán)限放的比較大,按照daemon要求的限制到755
          chmod -R 755 /opt

          問題就解決了。

          其實(shí)這個場景還是蠻常見的,遇到的人應(yīng)該挺多的

          posted @ 2015-02-28 16:51 Milo的海域 閱讀(543) | 評論 (0)編輯 收藏

          latency = client send request time + network trans time (->)+ server receive request time+ reponse time + server send reponse time+ network trans time (<-)+ client receive reponse time

          latency = first byte out, last byte in time

          posted @ 2014-07-01 14:10 Milo的海域 閱讀(570) | 評論 (0)編輯 收藏

          以前用centos的chkconfig來管理系統(tǒng)服務(wù),而ubuntu上是沒有這個工具的,google上提到一個替代品sysv-rc-conf, apt-get install下就可以直接用了,有個text console可以使用

          posted @ 2013-12-24 14:54 Milo的海域 閱讀(5283) | 評論 (0)編輯 收藏

          Java程序的memory leak分析也可以用valgrind, 尤其是JNI程序尤其有用:
          valgrind --error-limit=no --trace-children=yes --smc-check=all --leak-check=full JAVA_CMD

          特意寫了個有l(wèi)eak的jni函數(shù),用valgrind成功檢查出來了
          ==31915== 100 bytes in 1 blocks are definitely lost in loss record 447 of 653
          ==31915==    at 0x402CE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
          ==31915==    by 0x60424F9: Java_MyJNI_hello (MyJNI.c:16)

          在老版本valgrind(3.5.0) enable了--trace-children選項(xiàng)后可能出現(xiàn)錯誤:
           Error occurred during initialization of VM    
          Unknown x64 processor: SSE2 not supported

          升級到最新版可以解決這個問題,升級方法:下載src包 解壓后執(zhí)行 ./configure; make; make install

          posted @ 2013-12-06 10:26 Milo的海域 閱讀(1008) | 評論 (0)編輯 收藏

          僅列出標(biāo)題
          共9頁: 上一頁 1 2 3 4 5 6 7 8 9 下一頁 
          主站蜘蛛池模板: 七台河市| 韶山市| 南靖县| 博客| 杂多县| 修水县| 岑巩县| 涿鹿县| 池州市| 江陵县| 兴业县| 景泰县| 北流市| 丁青县| 香格里拉县| 寻乌县| 西昌市| 武鸣县| 齐河县| 宝鸡市| 县级市| 衡山县| 富裕县| 河西区| 天全县| 普兰店市| 苗栗县| 施甸县| 淮阳县| 文成县| 米泉市| 海门市| 双柏县| 长丰县| 南部县| 襄垣县| 安溪县| 长岛县| 比如县| 阜城县| 桦南县|