Opened 11 years ago

Closed 11 years ago

#42088 closed update (fixed)

pgf to 3.0.0

Reported by: nerdling (Jeremy Lavergne) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), mojca (Mojca Miklavec)
Port: pgf

Description

I've been hammering away at updating pgf and am giving up. Here's what I managed to get going.

Attachments (3)

pgf.diff (3.5 KB) - added by nerdling (Jeremy Lavergne) 11 years ago.
patches to a partial 3.0.0
patch-Makefile.diff (1013 bytes) - added by mojca (Mojca Miklavec) 11 years ago.
patch-MakefileConfig.mk.diff (746 bytes) - added by mojca (Mojca Miklavec) 11 years ago.

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by nerdling (Jeremy Lavergne)

Attachment: pgf.diff added

patches to a partial 3.0.0

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

am giving up

what's the error that you're running into?

Last edited 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:2 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:3 in reply to:  1 ; Changed 11 years ago by nerdling (Jeremy Lavergne)

Replying to egall@…: The latest is undefined symbol _main. So not sure how the program's even going to run with no main function. Is it naive to give up when seeing that a program has no entry point?

Then there are further things, like going through all the other Makefiles and making sure they are respecting our c/ld flags.

comment:4 in reply to:  3 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to snc@…:

Replying to egall@…: The latest is undefined symbol _main. So not sure how the program's even going to run with no main function. Is it naive to give up when seeing that a program has no entry point?

Then there are further things, like going through all the other Makefiles and making sure they are respecting our c/ld flags.

I think the first issue should be able to be solved by solving the second. Usually when I get a missing "_main" symbol error it is because the software somehow ends up linking for a different architecture than the one that it was compiled for.

comment:5 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:6 Changed 11 years ago by mojca (Mojca Miklavec)

This setting is definitely wrong:

# Where the shared libraries should be installed (base dir)
INSTALLDIR=/usr/texbin/lib/luatex/lua

My suggestion would be to simply upgrade pgf to version 3.0.0 without building anything first. And then slowly try to figure out how to build the needed libraries. I believe that it should be possible to build the libraries without the lua port, but I don't really know. In any case the C code and Makefiles need a bit of cleaning up.

I'll add a few more patches on top of what you already provided though.

Changed 11 years ago by mojca (Mojca Miklavec)

Attachment: patch-Makefile.diff added

Changed 11 years ago by mojca (Mojca Miklavec)

comment:7 Changed 11 years ago by mojca (Mojca Miklavec)

You also need to remove

-    file copy ${r}/scripts ${destroot}${texlive_texmfports}/

from the Portfile.

So what do you think about simply upgrading 3.0.0 without worrying about compiling the C code, at least for the first revision? This then gives sufficient time to play with the rest. Compiling that code is not strictly necessary unless for the new advanced features that only work in luatex.

comment:8 Changed 11 years ago by mojca (Mojca Miklavec)

Btw: you don't need any main function in a library. All that's missing is probably a -shared flag during compilation. After the few additional patches that I submitted I end up with a different error though:

/usr/bin/clang -Os -arch x86_64 -O2 -Wall -I/opt/local/include -I../../../..  -shared -L/opt/local/lib -Wl,-headerpad_max_install_names -llua \
	 \
	-o SimpleDemoCPlusPlus.so \
	SimpleDemoCPlusPlus.o ../../interface/c/InterfaceFromC++.o ../../interface/c/InterfaceFromC.o
Undefined symbols for architecture x86_64:
  "std::terminate()", referenced from:
      FastLayout::declare(scripting::script) in SimpleDemoCPlusPlus.o
  "vtable for __cxxabiv1::__class_type_info", referenced from:
      typeinfo for scripting::declarations in SimpleDemoCPlusPlus.o
      typeinfo for scripting::runner in SimpleDemoCPlusPlus.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
      typeinfo for FastLayout in SimpleDemoCPlusPlus.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "operator delete(void*)", referenced from:
      FastLayout::~FastLayout() in SimpleDemoCPlusPlus.o
      non-virtual thunk to FastLayout::~FastLayout() in SimpleDemoCPlusPlus.o
  "operator new(unsigned long)", referenced from:
      _luaopen_pgf_gd_examples_c_SimpleDemoCPlusPlus in SimpleDemoCPlusPlus.o
  "___gxx_personality_v0", referenced from:
      FastLayout::declare(scripting::script) in SimpleDemoCPlusPlus.o
      Dwarf Exception Unwind Info (__eh_frame) in SimpleDemoCPlusPlus.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

comment:9 in reply to:  8 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to mojca@…:

Btw: you don't need any main function in a library. All that's missing is probably a -shared flag during compilation. After the few additional patches that I submitted I end up with a different error though:

/usr/bin/clang -Os -arch x86_64 -O2 -Wall -I/opt/local/include -I../../../..  -shared -L/opt/local/lib -Wl,-headerpad_max_install_names -llua \
	 \
	-o SimpleDemoCPlusPlus.so \
	SimpleDemoCPlusPlus.o ../../interface/c/InterfaceFromC++.o ../../interface/c/InterfaceFromC.o
Undefined symbols for architecture x86_64:
  "std::terminate()", referenced from:
      FastLayout::declare(scripting::script) in SimpleDemoCPlusPlus.o
  "vtable for __cxxabiv1::__class_type_info", referenced from:
      typeinfo for scripting::declarations in SimpleDemoCPlusPlus.o
      typeinfo for scripting::runner in SimpleDemoCPlusPlus.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
      typeinfo for FastLayout in SimpleDemoCPlusPlus.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "operator delete(void*)", referenced from:
      FastLayout::~FastLayout() in SimpleDemoCPlusPlus.o
      non-virtual thunk to FastLayout::~FastLayout() in SimpleDemoCPlusPlus.o
  "operator new(unsigned long)", referenced from:
      _luaopen_pgf_gd_examples_c_SimpleDemoCPlusPlus in SimpleDemoCPlusPlus.o
  "___gxx_personality_v0", referenced from:
      FastLayout::declare(scripting::script) in SimpleDemoCPlusPlus.o
      Dwarf Exception Unwind Info (__eh_frame) in SimpleDemoCPlusPlus.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like it needs to be told which c++ library to use for a standard c++ library. Either that or it needs some compiler blacklisting. Although it looks like by the filename that this is just a demo, so maybe demos could be skipped being built...

comment:10 Changed 11 years ago by mojca (Mojca Miklavec)

Given that the port has no maintainer, I upgraded the port to 3.0.0 in r115962. I left building the modules commented out for now. I talked to developer(s) of LuaTeX and they had a bunch of comments about the way this should have been implemented instead.

comment:11 Changed 11 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

I'm closing the ticket based on the fact that the port was upgraded to 3.0.0. If anyone really needs those special add-ons which require extra compilation, feel free to open a new ticket.

Note: See TracTickets for help on using tickets.