Opened 9 years ago

Closed 9 years ago

#32551 closed defect (fixed)

dylibbundler: ./src/DylibBundler.cpp:65:15: error: ‘exit’ was not declared in this scope

Reported by: rudloff@… Owned by: macports-tickets@…
Priority: Low Milestone:
Component: ports Version: 2.0.3
Keywords: linux Cc: ryandesign (Ryan Schmidt)
Port: dylibbundler

Description

dylibbundler won't build on Linux:

/usr/bin/c++  -c -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o
./src/DylibBundler.cpp: In function ‘void collectDependencies(std::string, std::vector<std::basic_string<char> >&)’:
./src/DylibBundler.cpp:65:15: error: ‘exit’ was not declared in this scope
./src/DylibBundler.cpp: In function ‘void collectDependencies(std::string)’:
./src/DylibBundler.cpp:78:30: error: ‘stdout’ was not declared in this scope
./src/DylibBundler.cpp:78:36: error: ‘fflush’ was not declared in this scope
./src/DylibBundler.cpp: In function ‘void collectSubDependencies()’:
./src/DylibBundler.cpp:102:38: error: ‘stdout’ was not declared in this scope
./src/DylibBundler.cpp:102:44: error: ‘fflush’ was not declared in this scope
./src/DylibBundler.cpp: In function ‘void createDestDir()’:
./src/DylibBundler.cpp:136:10: error: ‘exit’ was not declared in this scope
./src/DylibBundler.cpp:151:11: error: ‘exit’ was not declared in this scope
./src/DylibBundler.cpp:157:10: error: ‘exit’ was not declared in this scope

Well, this is not really surprising as it has been created specifically for OSX. But I wonder why it tries to build it, as the port specifies darwin as platform.

Attachments (2)

main.log (4.8 KB) - added by rudloff@… 9 years ago.
linux.diff (1.9 KB) - added by rudloff@… 9 years ago.

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by rudloff@…

Attachment: main.log added

Changed 9 years ago by rudloff@…

Attachment: linux.diff added

comment:1 Changed 9 years ago by rudloff@…

Here is a patch to build it on Linux. I am not sure how it will work, though.

comment:2 in reply to:  1 Changed 9 years ago by ryandesign (Ryan Schmidt)

Replying to rudloff@…:

But I wonder why it tries to build it, as the port specifies darwin as platform.

The platforms field is informational only. MacPorts does not actually look at that field to determine whether or not to allow building a port.

Replying to rudloff@…:

Here is a patch to build it on Linux. I am not sure how it will work, though.

Well, did it work when you tested it?

comment:3 Changed 9 years ago by rudloff@…

It builds but is pretty much unusable for now as it tries to use otool (which is OSX only):

* Collecting dependenciessh: otool: not found

But I might be able to build otool on Linux or patch it to use ldd instead.

comment:4 Changed 9 years ago by rudloff@…

odcctools refuse to build on Linux and dylibbundler is just too Mac specific anyway so we should just prevent the port from building on any other platform.

comment:5 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.