Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Error building upp on Ventura (Linker errors )
Error building upp on Ventura [message #60328] Wed, 06 December 2023 20:44 Go to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi,

I'm trying to build the latest version on Ventura but it fails with the following error(s):

ld: Undefined symbols:
  Upp::PNGEncoder::PNGEncoder(int, Upp::ImageKind, bool), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::PNGEncoder::~PNGEncoder(), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::StreamRaster::LoadFileAny(char const*, Upp::Function<bool (int, int)>), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::StreamRasterEncoder::SaveFile(char const*, Upp::Image const&), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::PNGRaster__initializer(), referenced from:
      __GLOBAL__sub_I_Cocoa.cpp in Builders.a[9](Cocoa.o)
  Upp::Image::Image(Upp::Image const&), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::Image::~Image(), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
      ...
  Upp::Image::operator=(Upp::Image const&), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
  Upp::Rescale(Upp::Image const&, int, int, Upp::Function<bool (int, int)>), referenced from:
      GccBuilder::CocoaAppBundle() in Builders.a[9](Cocoa.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [umk] Error 1
./umk ./uppsrc ide CLANG -brs ./theide
./install: line 106: ./umk: No such file or directory
./install: line 107: ./umk: No such file or directory
Something went wrong.
Please notify developers.


I'm using brew and I have libpng installed.

Any advice?

Thanks in advance,
M
Re: Error building upp on Ventura [message #60351 is a reply to message #60328] Wed, 20 December 2023 14:44 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

Did you initiate the build by running install command from upp root directory after extracting:
./install


It should install following packages on mac using brew:
brew install openssl clang-format


Also, it is recommended to install XCode. Right now I can not confirm whenever it is needed, but definitely it is worth installing. In the end you need XCode command line tools. Here is the article that describes how to download them.

Klugier


U++ - one framework to rule them all.

[Updated on: Wed, 20 December 2023 14:45]

Report message to a moderator

Re: Error building upp on Ventura [message #60355 is a reply to message #60328] Thu, 21 December 2023 04:26 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi Klugier,

Thanks for the reply!

I used

./configure
./install


from the root folder.

Both open ssl and clang-format installed by brew, and I also have Xcode and Xcode command line tools installed.

Tanks,
M

Re: Error building upp on Ventura [message #60356 is a reply to message #60355] Thu, 21 December 2023 10:51 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I confirm the issue is there. I manage to reproduce on my mac when building U++ from tarball. The issue was introduced in this change (UMK as pure console application). We will be working on the fix. Since, that time I encourage you to use stable release instead. It should not be affected by this change. Thank you very much for reporting this issue! Thanks to that our project will be better.

Klugier


U++ - one framework to rule them all.
Re: Error building upp on Ventura [message #60358 is a reply to message #60356] Thu, 21 December 2023 20:12 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi,

Thanks a lot for investigating!
I downloaded a few stable versions (2023.2, 2023.1, 2022.3), but all my attempts to build from source failed, unfortunately.

16270 (2022.2) has a pre-built theide app, so I'm testing it for now.

Thanks,
M
Re: Error building upp on Ventura [message #60369 is a reply to message #60358] Mon, 25 December 2023 17:02 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Maelcum,

Mirek reverted broken commit, so everything should works fine right now. Please check with today's nightly (25th of December 2023) or newest and let me know if everything works as expected.

Klugier


U++ - one framework to rule them all.
Re: Error building upp on Ventura [message #60412 is a reply to message #60369] Fri, 05 January 2024 03:43 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi Klugier,

Sorry about the late answer!
I tried to build the latest nightly (17150) on Ventura, but it failed, unfortunately.

(date '+#define bmYEAR    %y%n#define bmMONTH   %m%n#define bmDAY     %d%n#define bmHOUR    %H%n#define bmMINUTE  %M%n#define bmSECOND  %S%n#define bmTIME    Time( %y, %m, %d, %H, %M, %S )' | sed 's| 0\([[:digit:]]\)| \1|g' && \
	echo '#define bmMACHINE "'`hostname`'"' && \
	echo '#define bmUSER    "'`whoami`'"') > ".cache/upp.out//build_info.h"
make: *** No rule to make target `uppsrc/umk/Console.cpp', needed by `.cache/upp.out/umk/GCC-Gcc-Linux-Main-Nomm-Posix-Shared/Console.o'.  Stop.
make: *** Waiting for unfinished jobs....
./umk ./uppsrc ide CLANG -brs ./theide
./install: line 106: ./umk: No such file or directory
./install: line 107: ./umk: No such file or directory
Something went wrong.
Please notify developers.


I also tried an earlier (17138) which also failed. The build process created a broken theide.app file which was mostly empty. The error message wasn't really helpful.

Linking...
/Users/imrelovasz/dev/External/build/upp_17138/umk (4475184 B) linked in (0:00.38)

OK. (1:40.80)
Something went wrong.
Please notify developers.


I also downloaded upp-posix-17136.tar.xz (the suggested nightly for 2023.12.25) but it contains Windows executables, it's not a source distribution.

Thanks in advance,
M
Re: Error building upp on Ventura [message #60413 is a reply to message #60412] Fri, 05 January 2024 11:20 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

The nightly build 17150 compiles fine on my mac machine (Sonoma 14.1.1). I downloaded "01:06 upp-posix-17150.tar.xz (35 MB)" and then extracted archive to my home directory and then in terminal I ran:
./install


In case of problems, can you post here full compilation log - not only the last part of it. Also, please remove all previous installations of upp (do not override files from new archive).

Klugier


U++ - one framework to rule them all.
Re: Error building upp on Ventura [message #60414 is a reply to message #60413] Fri, 05 January 2024 16:30 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi,

I've attached the entire build log for trying to build 17150 on Ventura and Monterey (in a zip file, since I can't attach/upload more than one file).

Thanks,
Imre
Re: Error building upp on Ventura [message #60416 is a reply to message #60414] Fri, 05 January 2024 21:27 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

Thanks for uploading the log file! It looks like linker can not find openssl. Here is the errors from your log file:
Linking...
clang: error: no such file or directory: 'libcrypto.a'
clang: error: no such file or directory: 'libssl.a'


Can you run on your machine following command and send me the output:
brew list openssl


Also, currently I am trying to launch mac build on CircleCI and I encourage similar problem. Here is my PR (CircleCI for macOS). If you want to try and move forward, you may try to modify uppsrc/ide/Builders/Install.cpp to what I have in PR. It means that line 163 and 164 should be:
Path("$INCLUDE$", "/opt/local/include;/usr/include;/usr/local/include;/opt/homebrew/include;/opt/homebrew/opt/openssl/include");
Path("$LIB$", "/opt/local/lib;/usr/lib;/usr/local/lib;/opt/homebrew/lib;/opt/homebrew/opt/openssl/lib");


Klugier


U++ - one framework to rule them all.

[Updated on: Fri, 05 January 2024 21:32]

Report message to a moderator

Re: Error building upp on Ventura [message #60417 is a reply to message #60416] Fri, 05 January 2024 21:30 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi,

Sure, here's the output:

➜  upp brew list openssl
/usr/local/Cellar/openssl@3/3.2.0_1/.bottle/etc/ (7 files)
/usr/local/Cellar/openssl@3/3.2.0_1/bin/c_rehash
/usr/local/Cellar/openssl@3/3.2.0_1/bin/openssl
/usr/local/Cellar/openssl@3/3.2.0_1/include/openssl/ (139 files)
/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.3.dylib
/usr/local/Cellar/openssl@3/3.2.0_1/lib/libssl.3.dylib
/usr/local/Cellar/openssl@3/3.2.0_1/lib/engines-3/ (3 files)
/usr/local/Cellar/openssl@3/3.2.0_1/lib/ossl-modules/legacy.dylib
/usr/local/Cellar/openssl@3/3.2.0_1/lib/pkgconfig/ (3 files)
/usr/local/Cellar/openssl@3/3.2.0_1/lib/ (4 other files)
/usr/local/Cellar/openssl@3/3.2.0_1/share/doc/ (850 files)
/usr/local/Cellar/openssl@3/3.2.0_1/share/man/ (5787 files)
➜  upp 


Thanks,
M
Re: Error building upp on Ventura [message #60418 is a reply to message #60417] Fri, 05 January 2024 21:37 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

This PR (CircleCI for macOS) should solve your issue. I managed to reproduce your problem on CircleCI. Exactly the same error and exactly the same paths returned by brew list command. If you want to move forward you can modify the source file by your own (uppsrc/ide/Builders/Install.cpp - lines 163 & 164) to:
Path("$INCLUDE$", "/opt/local/include;/usr/include;/usr/local/include;/opt/homebrew/include;/opt/homebrew/opt/openssl/include");
Path("$LIB$", "/opt/local/lib;/usr/lib;/usr/local/lib;/opt/homebrew/lib;/opt/homebrew/opt/openssl/lib");


As you see in above code. I added /usr/local/include to "$INCLUDES" and /usr/local/lib to "$LIB$". If you don't want to experiment you will need to wait several days until we will merge my PR and then when new nightly build will be generated. I will let you know when it will happened.

Many thanks for raising this issue! Very important one!

Klugier


U++ - one framework to rule them all.

[Updated on: Fri, 05 January 2024 21:40]

Report message to a moderator

Re: Error building upp on Ventura [message #60420 is a reply to message #60418] Sat, 06 January 2024 19:40 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Maelcum,

My PR with the fix has been merged. Please check compilation on tomorrows nightly (January 7th 2024). The version number should be something equal or greater than 17154.

Klugier



U++ - one framework to rule them all.
Re: Error building upp on Ventura [message #60422 is a reply to message #60420] Sat, 06 January 2024 20:43 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi Klugier,

Thank you very much to investigate and fix the issue!

I'll check the new nightly tomorrow and I let you know.

Cheers,
M
Re: Error building upp on Ventura [message #60426 is a reply to message #60420] Mon, 08 January 2024 20:50 Go to previous messageGo to next message
Maelcum is currently offline  Maelcum
Messages: 8
Registered: December 2023
Location: Canada
Promising Member
Hi Klugier,

I've downloaded upp-posix-17155.tar.xz, built/installed it, and everything seems to be working fine.

Thank you so much!

Cheers,
M
Re: Error building upp on Ventura [message #60427 is a reply to message #60426] Mon, 08 January 2024 21:31 Go to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Maelcum,

Good to hear that! Enjoy TheIDE and our framework we put a lot of effort into it!

Klugier


U++ - one framework to rule them all.
Previous Topic: Clipboard Usage
Next Topic: [SOLVED] Mysqlclient statically linked: how to do?
Goto Forum:
  


Current Time: Fri May 03 21:51:23 CEST 2024

Total time taken to generate the page: 0.03365 seconds