question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: undefined reference to `context'

See original GitHub issue

Since the merge of Pull Request #565 we get following error with ModeSim 32-bit on Windows:

make -C /e/projects/EDA/Python/cocotb/lib/utils SIM=modelsim
make[2]: Entering directory `/e/projects/EDA/Python/cocotb/lib/utils'
gcc -m32 -g -DDEBUG -shared -DMODELSIM -c -I/e/projects/EDA/Python/cocotb/include -Ic:\Python27\include  -o /e/projects/EDA/Python/cocotb/build/obj/i686/cocotb_utils.o cocotb_utils.cgcc -m32 -g -DDEBUG -shared -DMODELSIM -shared -Wl,-no-undefined -Wl,-enable-runtime-pseudo-reloc-v2 -Wl,--enable-auto-import -L/c/Python27/libs -o /e/projects/EDA/Python/cocotb/build/libs/i686/libcocotbutils.dll /e/projects/
EDA/Python/cocotb/build/obj/i686/cocotb_utils.oe:/projects/EDA/Python/cocotb/build/obj/i686/cocotb_utils.o: In function `to_python':
e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:49: undefined reference to `context'
e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:53: undefined reference to `context'
e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:53: undefined reference to `context'
e:/projects/EDA/Python/cocotb/build/obj/i686/cocotb_utils.o: In function `to_simulator':
e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:58: undefined reference to `context'
e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:63: undefined reference to `context'
e:/projects/EDA/Python/cocotb/build/obj/i686/cocotb_utils.o:e:/projects/EDA/Python/cocotb/include/cocotb_utils.h:63: more undefined references to `context' follow
collect2.exe: error: ld returned 1 exit status
make[2]: *** [/e/projects/EDA/Python/cocotb/build/libs/i686/libcocotbutils.dll] Error 1
make[2]: Leaving directory `/e/projects/EDA/Python/cocotb/lib/utils'
make[1]: *** [/e/projects/EDA/Python/cocotb/build/libs/i686/libcocotbutils.dll] Error 2
make[1]: Leaving directory `/e/projects/CubeSatCOM/dev/verificaton/cocotb/HEI'
make: *** [sim] Error 2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oligucommented, Jun 4, 2018

@elgorwi thanks a lot. indeed, this solves the error.

@stuarthodgson can you merge #620 please

1reaction
elgorwicommented, Jun 2, 2018

@oligu I’ve issued #620. This should get around the compilation error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What causes the error "undefined reference to (some function)"?
The error message tells you that none of the object files you're linking against contains a definition for avergecolumns . The reason for...
Read more >
Re: How to fix "undefined reference" error? - NXP Community
The issue is that you have missed to include "fsl_gpio.h" in MKF64F_project.c. That symbol is defined as inline function in that header file,...
Read more >
compiling on linux64 · Issue #14 · bakercp/ofxJSONRPC
I get errors when trying to compile the example on linux: ... Poco::Net::Context::createSSLContext(): error: undefined reference to 'SSLv23_client_method' ...
Read more >
ERROR: undefined reference to `iio_buffer_destroy' - Q&A
Hi,. I am an absolute beginner to LibIIO. - I am trying to execute the AD9361-iostream.c example on a GomSpace SDR (Zynq 7000...
Read more >
How to fix 'undefined reference to `main' collect2: error
This is a linker error, and it's telling you that the main function that it needs in order to run your code isn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found