FAQ
Hello, I want to build my program with new go 1.1 but face the problem :

x_wrap_StepModel_GetTriangleNormalX: unhandled relocation for
_wrap_StepModel_GetTriangleNormalX (type 28 rtype 120)
x_wrap_StepModel_GetTriangleNormalX: missing section for
_wrap_StepModel_GetTriangleNormalX
x_wrap_StepModel_GetTriangleNormalY: unhandled relocation for
_wrap_StepModel_GetTriangleNormalY (type 28 rtype 120)
x_wrap_StepModel_GetTriangleNormalY: missing section for
_wrap_StepModel_GetTriangleNormalY
x_wrap_StepModel_GetTriangleNormalZ: unhandled relocation for
_wrap_StepModel_GetTriangleNormalZ (type 28 rtype 120)
x_wrap_StepModel_GetTriangleNormalZ: missing section for
_wrap_StepModel_GetTriangleNormalZ

I use swig 2.0.9, go 1.1 and ubuntu 12.10.

I try to use -ldflags "-linkmode internal", the program will be generated
success but if you call the function, you will never get response.

Same program has no problem in mac.

How can I fix it?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • 刘铭 at May 17, 2013 at 1:41 pm
    Here are my swig file, I delete function code, so everyone can try it.

    I test it on ubuntu 12.10 amd64 and i386, same error, after cut, the error
    message like:

    x_wrap_StepModel_GetTrianglesLen: unhandled relocation for
    _wrap_StepModel_GetTrianglesLen (type 28 rtype 120)
    x_wrap_StepModel_GetTrianglesLen: missing section for
    _wrap_StepModel_GetTrianglesLen
    x_wrap_delete_StepModel: unhandled relocation for _wrap_delete_StepModel
    (type 28 rtype 120)
    x_wrap_delete_StepModel: missing section for _wrap_delete_StepModel
    x_wrap_new_StepModel: unhandled relocation for _wrap_new_StepModel (type 28
    rtype 120)
    x_wrap_new_StepModel: missing section for _wrap_new_StepModel
    x_wrap_StepModel_GetTrianglesLen: reloc 120 to non-elf symbol
    _wrap_StepModel_GetTrianglesLen (outer=_wrap_StepModel_GetTrianglesLen) 28
    x_wrap_delete_StepModel: reloc 120 to non-elf symbol _wrap_delete_StepModel
    (outer=_wrap_delete_StepModel) 28
    x_wrap_new_StepModel: reloc 120 to non-elf symbol _wrap_new_StepModel
    (outer=_wrap_new_StepModel) 28

    .i file like:

    %module step

    %{
    #include "StepReader.hpp"
    %}

    %include "StepReader.hpp"
    On Friday, May 17, 2013 6:08:29 PM UTC+8, 刘铭 wrote:

    Hello, I want to build my program with new go 1.1 but face the problem :

    x_wrap_StepModel_GetTriangleNormalX: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalX (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalX: missing section for
    _wrap_StepModel_GetTriangleNormalX
    x_wrap_StepModel_GetTriangleNormalY: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalY (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalY: missing section for
    _wrap_StepModel_GetTriangleNormalY
    x_wrap_StepModel_GetTriangleNormalZ: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalZ (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalZ: missing section for
    _wrap_StepModel_GetTriangleNormalZ

    I use swig 2.0.9, go 1.1 and ubuntu 12.10.

    I try to use -ldflags "-linkmode internal", the program will be generated
    success but if you call the function, you will never get response.

    Same program has no problem in mac.

    How can I fix it?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Ian Lance Taylor at May 17, 2013 at 1:52 pm

    On Fri, May 17, 2013 at 3:08 AM, 刘铭 wrote:
    Hello, I want to build my program with new go 1.1 but face the problem :

    x_wrap_StepModel_GetTriangleNormalX: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalX (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalX: missing section for
    _wrap_StepModel_GetTriangleNormalX
    x_wrap_StepModel_GetTriangleNormalY: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalY (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalY: missing section for
    _wrap_StepModel_GetTriangleNormalY
    x_wrap_StepModel_GetTriangleNormalZ: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalZ (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalZ: missing section for
    _wrap_StepModel_GetTriangleNormalZ

    I use swig 2.0.9, go 1.1 and ubuntu 12.10.
    If possible, please make a small complete test case that shows the
    problem using go build, and open an issue at
    http://code.google.com/p/go/issues . The error messages seem
    impossible to me, as those rtype values are not valid and should never
    occur.

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • 刘铭 at May 23, 2013 at 12:38 am
    The situation is more complicated than my thought, I made a
    issue https://code.google.com/p/go/issues/detail?id=5545

    It seems that caused by mix of swig ( use runtime.cgocall from c side) and
    cgo (use import "C" from go side), just my thought :-)
    On Friday, May 17, 2013 6:08:29 PM UTC+8, 刘铭 wrote:

    Hello, I want to build my program with new go 1.1 but face the problem :

    x_wrap_StepModel_GetTriangleNormalX: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalX (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalX: missing section for
    _wrap_StepModel_GetTriangleNormalX
    x_wrap_StepModel_GetTriangleNormalY: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalY (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalY: missing section for
    _wrap_StepModel_GetTriangleNormalY
    x_wrap_StepModel_GetTriangleNormalZ: unhandled relocation for
    _wrap_StepModel_GetTriangleNormalZ (type 28 rtype 120)
    x_wrap_StepModel_GetTriangleNormalZ: missing section for
    _wrap_StepModel_GetTriangleNormalZ

    I use swig 2.0.9, go 1.1 and ubuntu 12.10.

    I try to use -ldflags "-linkmode internal", the program will be generated
    success but if you call the function, you will never get response.

    Same program has no problem in mac.

    How can I fix it?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sbarra Paul at Sep 30, 2013 at 9:45 pm

    On Wednesday, May 22, 2013 7:38:16 PM UTC-5, 刘铭 wrote:
    The situation is more complicated than my thought, I made a issue
    https://code.google.com/p/go/issues/detail?id=5545

    I noticed that this issue is marked fixed, but I see a very similar issue
    when trying to build the swig tutorial <http://www.swig.org/tutorial.html>example. I've attached the example files and the steps necessary to
    reproduce the isse to the bug report but am not able to re-open the issue
    (because I didn't originally generate it?). Would it be possible for
    someone to verify it's fixed and re-open the issue if necessary.

    Thanks

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Sep 30, 2013 at 9:47 pm
    Please open a new issue. The worst thing that can happen is it is a
    duplicate and someone will mark it as such.
    On Tue, Oct 1, 2013 at 7:19 AM, wrote:

    On Wednesday, May 22, 2013 7:38:16 PM UTC-5, 刘铭 wrote:

    The situation is more complicated than my thought, I made a issue
    https://code.google.com/p/go/issues/detail?id=5545
    I noticed that this issue is marked fixed, but I see a very similar issue
    when trying to build the swig tutorial example. I've attached the example
    files and the steps necessary to reproduce the isse to the bug report but am
    not able to re-open the issue (because I didn't originally generate it?).
    Would it be possible for someone to verify it's fixed and re-open the issue
    if necessary.

    Thanks

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sbarra Paul at Oct 1, 2013 at 3:31 pm

    On Monday, September 30, 2013 4:47:47 PM UTC-5, Dave Cheney wrote:
    Please open a new issue. The worst thing that can happen is it is a
    duplicate and someone will mark it as such.

    Since this thread is one of the top hits for unhandled relocation I wanted
    to post the new issue id in case anyone else comes across this.
    http://code.google.com/p/go/issues/detail?id=6521

    Thanks

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 17, '13 at 1:01p
activeOct 1, '13 at 3:31p
posts7
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase