Opened 12 years ago
Closed 12 years ago
#5088 closed Patches (fixed)
Odd definition of main() inside library on AIX
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | Boost 1.47.0 | Component: | regex |
| Version: | Boost 1.45.0 | Severity: | Problem |
| Keywords: | Cc: | ccambly@… |
Description
There seems to be a definition of main() that is there only for __IBMCPP__. This definition seems to be doing more harm than good for me.
Attachments (1)
Change History (6)
by , 12 years ago
| Attachment: | regex.cpp.patch added |
|---|
comment:1 by , 12 years ago
I was under the impression that IBM's compiler needed a main() in order to build regex as a DLL? Maybe that restriction has been removed? What issues does it's presence cause, and what compiler version are you using?
Thanks, John.
comment:2 by , 12 years ago
Ah wait... is this on AIX with IBM's linker, or on Linux with the system linker?
comment:3 by , 12 years ago
This is AIX with IBM's linker.
A normal build produces:
ld: 0711-224 WARNING: Duplicate symbol: .main
When using -qextchk (adds XCOFF type-check information):
ld: 0711-197 ERROR: Type mismatches for symbol: .main
The confusion over needing main() in the library sounds like an issue with not setting -bnoentry on the link step. I believe that this was resolved with a fix to vacpp.jam.
comment:4 by , 12 years ago
| Milestone: | To Be Determined → Boost 1.47.0 |
|---|
comment:5 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

Patch to libs/regex/src/regex.cpp removing main() from library